Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Subscription validation request failed #2447

Closed
Nardol opened this issue Jul 9, 2023 · 11 comments
Closed

Bug: Subscription validation request failed #2447

Nardol opened this issue Jul 9, 2023 · 11 comments
Labels

Comments

@Nardol
Copy link

Nardol commented Jul 9, 2023

Describe the bug

I have set a webhook using Nginx which points to my desktop using Wireguard.
With version 2.4.23 everything worked but with 2.4.25 I have the following error when running with --monitor:

Initializing subscription for updates ...
Webhook: handled validation request

ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 400 (Bad Request)

Operating System Details

Linux pcbob 5.10.0-0.deb10.23-amd64 #1 SMP Debian 5.10.179-1~deb10u1 (2023-05-26) x86_64 GNU/Linux
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

Client Installation Method

From Source

OneDrive Account Type

Personal

What is your OneDrive Application Version

onedrive v2.4.25

What is your OneDrive Application Configuration

Configuration file successfully loaded
onedrive version                             = v2.4.25
Config path                                  = /home/pzajda/.config/onedrive
Config file found in config path             = true
Config option 'sync_dir'                     = /home/pzajda/OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive/
Config option 'disable_notifications'        = false
Config option 'min_notify_changes'           = 5
Config option 'skip_dir'                     = 
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 6
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 700
Config option 'sync_file_permissions'        = 600
Config option 'space_reservation'            = 52428800
Config option 'application_id'               = 
Config option 'azure_ad_endpoint'            = 
Config option 'azure_tenant_id'              = common
Config option 'user_agent'                   = 
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 60
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 600
Config option 'ip_protocol_version'          = 0
Config option 'sync_root_files'              = false
Selective sync 'sync_list' configured        = false
Config option 'sync_business_shared_folders' = false
Business Shared Folders configured           = false
Config option 'webhook_enabled'              = true
Config option 'webhook_public_url'           = https://patrick.zajda.fr/webhooks/onedrive_pcbob
Config option 'webhook_listening_host'       = 
Config option 'webhook_listening_port'       = 8888
Config option 'webhook_expiration_interval'  = 86400
Config option 'webhook_renewal_interval'     = 43200

What is your 'curl' version

curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1n zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16312948k,nr_inodes=4078237,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=3270892k,mode=755)
/dev/nvme0n1p3 on / type ext4 (rw,noatime,nodiratime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18039)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/nvme0n1p4 on /home type ext4 (rw,noatime,nodiratime,quota,usrquota,grpquota)
/dev/sda1 on /var/vm type ext4 (rw,noatime,nodiratime,quota,usrquota,grpquota,data=writeback)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3270888k,nr_inodes=817722,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

What are all your local file system partition types

NAME        FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                          
└─sda1      ext4         4c2aaf45-ae9e-4483-8170-ce31a194a5f8  195,3G    50% /var/vm
sr0                                                                          
sr1                                                                          
zram0                                                                        [SWAP]
zram1                                                                        [SWAP]
zram2                                                                        [SWAP]
zram3                                                                        [SWAP]
zram4                                                                        [SWAP]
zram5                                                                        [SWAP]
zram6                                                                        [SWAP]
zram7                                                                        [SWAP]
zram8                                                                        [SWAP]
zram9                                                                        [SWAP]
zram10                                                                       [SWAP]
zram11                                                                       [SWAP]
nvme0n1                                                                      
├─nvme0n1p1 vfat         581A-F03D                              86,8M     6% /boot/efi
├─nvme0n1p2 ext2         1891f72e-62a2-4314-98c7-79626e392794                
├─nvme0n1p3 ext4         c520d8e3-9caa-45e3-9dc0-664205763df9    4,9G    78% /
└─nvme0n1p4 ext4         b636434e-b90a-4c2b-8ed7-dd16e30a6f8f    266G    34% /home

How do you use 'onedrive'

My Onedrive folder is not shared and most of time I only use my Linux desktop computer to access my Onedrive folder, my Windows VM is off most of time

Steps to reproduce the behaviour

I have this issue each time I run onedrive in monitor mode, with systemctl --user start onedrive or onedrive --monitor even with --dryrun

Complete Verbose Log Output

It is specified to not use monitor mode but this issue is related to monitor mode.

Screenshots

No response

Other Log Information or Details

No response

Additional context

No response

@Nardol Nardol added the Bug Something isn't working label Jul 9, 2023
@abraunegg
Copy link
Owner

@Nardol
A 400 Bad Request is indicative of a problem somewhere - either the API has changed or your config has changed.

@abraunegg abraunegg reopened this Jul 9, 2023
@abraunegg
Copy link
Owner

abraunegg commented Jul 9, 2023

@Nardol
Bad fingers on mobile .. sorry .. was trying to add the following:

However in v2.4.24 there was a webhook change - see

https://github.com/abraunegg/onedrive/pull/2339/files

Can you please generate a verbose debug log using --monitor with v2.4.23 and v2.4.25 and email the output please as per:

https://github.com/abraunegg/onedrive/wiki/Generate-https-debug-log-for-support

@abraunegg
Copy link
Owner

@Nardol
A further note here is also that you are using an obsolete Debian version - strongly consider to upgrade your system to Debian 12.

@Nardol
Copy link
Author

Nardol commented Jul 9, 2023

Can you please generate a verbose debug log using --monitor with v2.4.23 and v2.4.25 and email the output please as per:

https://github.com/abraunegg/onedrive/wiki/Generate-https-debug-log-for-support

Done.

@Nardol A further note here is also that you are using an obsolete Debian version - strongly consider to upgrade your system to Debian 12.

I know, but upgrading it to Debian 11 looks like a big chalenge so 12 tends to be one of my best dreams for now... I hop to be on Bullseye one day, some specificity make impossible to upgrade using standard procedures.

@abraunegg
Copy link
Owner

abraunegg commented Jul 10, 2023

@Nardol
Please can you test the following PR to gain further insight into your issue:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/2448/head:pr2448
git checkout pr2448

This PR adds some additional debug logging output to understand what is going on with your subscription request.

To run the PR, you need to run the client from the PR build directory:

./onedrive <any options needed>

To install the PR, you will need to perform sudo make install to install the PR version.

When running the PR version, your client version should be onedrive v2.4.25-4-g1c161ff or greater.

@abraunegg
Copy link
Owner

@Nardol
When running the PR version, please follow https://github.com/abraunegg/onedrive/wiki/Generate-https-debug-log-for-support to generate a HTTPS debug log - following the same process as before, however over the PR version is needed - thanks.

@Nardol
Copy link
Author

Nardol commented Jul 10, 2023

@Nardol When running the PR version, please follow https://github.com/abraunegg/onedrive/wiki/Generate-https-debug-log-for-support to generate a HTTPS debug log - following the same process as before, however over the PR version is needed - thanks.

Done just now 🙂

@abraunegg
Copy link
Owner

@Nardol
Any update on building the PR and sending the debug log over? Nothing received as yet.

@Nardol
Copy link
Author

Nardol commented Jul 11, 2023

@abraunegg I've sent you a new log, taking the opportunity to have one with debug you added since I sent you the previous log which strangely never arrived to you.
I hop this last one arrived to you right.

@Nardol
Copy link
Author

Nardol commented Jul 11, 2023

Finally it works.
Firstly I thought it was because I updated DMD from 2.100.0 to 2.104.0 but it is because I updated my Nginx proxy configuration as follow:

location /path/to/webhook {
    proxy_http_version 1.1;
    proxy_pass http://<ip>:8888;
}

Before I only had the proxy_pass directive in the location block.
Setting proxy_http_version to 1.1 looks changing a lot and solve this issue.

@Nardol Nardol closed this as completed Jul 11, 2023
abraunegg added a commit that referenced this issue Jul 11, 2023
* Update webhook example configuration based on #2447
@abraunegg
Copy link
Owner

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked as resolved and limited conversation to collaborators Jul 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants