Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Is there anyway to use other forms of webhook? Having trouble uploading #114

Open
NathanIceSea opened this issue Oct 30, 2018 · 1 comment

Comments

@NathanIceSea
Copy link

#25 In my local environment, official ngrok service is out of reach, and I guess due to this specific issue, I'm having trouble uploading files through the webhook. Here is the log.
By the way, I've modified some files and created some, neither can be synced, but pulling works fine though.

Starting onedrived ... OK
[2018-10-30 20:59:42,400] DEBUG: MainThread: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:42,802] DEBUG: MainThread: https://api.onedrive.com:443 "GET /v1.0/drives HTTP/1.1" 200 376
[2018-10-30 20:59:42,807] DEBUG: MainThread: Refreshing repository session.
[2018-10-30 20:59:42,807] DEBUG: MainThread: Starting new HTTPS connection (1): login.live.com:443
[2018-10-30 20:59:44,050] DEBUG: MainThread: https://login.live.com:443 "POST /oauth20_token.srf HTTP/1.1" 200 1647
[2018-10-30 20:59:44,057] INFO: MainThread: Session for account 1d759be3b0fedada will expire in 3599 seconds.
[2018-10-30 20:59:44,057] DEBUG: MainThread: Will refresh session in 3479 seconds.
[2018-10-30 20:59:44,058] INFO: MainThread: Sweeping onedrived temporary files from local repositories.
[2018-10-30 20:59:44,069] DEBUG: Worker-0: Started.
[2018-10-30 20:59:44,069] DEBUG: Worker-1: Started.
[2018-10-30 20:59:45,077] INFO: MainThread: Local ngrok API url: http://127.0.0.1:4040/api
[2018-10-30 20:59:45,078] DEBUG: MainThread: Starting new HTTP connection (1): 127.0.0.1:4040
[2018-10-30 20:59:45,080] DEBUG: MainThread: http://127.0.0.1:4040 "GET /api/tunnels HTTP/1.1" 200 36
[2018-10-30 20:59:45,080] ERROR: MainThread: Error reading ngrok API: ngrok API did not return any tunnel.. Retry in 1sec.
[2018-10-30 20:59:46,085] DEBUG: MainThread: Starting new HTTP connection (1): 127.0.0.1:4040
[2018-10-30 20:59:46,088] DEBUG: MainThread: http://127.0.0.1:4040 "GET /api/tunnels HTTP/1.1" 200 389
[2018-10-30 20:59:46,090] DEBUG: WebhookWorker: Started.
[2018-10-30 20:59:46,091] INFO: Webhook: Local webhook server listening on port 35087.
[2018-10-30 20:59:46,091] INFO: Webhook: Webhook server listening on https://ae30b9d1.ngrok.io/EfXwoKLFc4.
[2018-10-30 20:59:46,093] DEBUG: MainThread: Adding task StartRepositoryTask(drive=1d759be3b0fedada)...
[2018-10-30 20:59:46,094] INFO: MainThread: Scheduled sync task for Drive 1d759be3b0fedada of account 1d759be3b0fedada.
[2018-10-30 20:59:46,094] DEBUG: Worker-0: Got task StartRepositoryTask(drive=1d759be3b0fedada).
[2018-10-30 20:59:46,094] INFO: MainThread: Updating webhook for Drive 1d759be3b0fedada.
[2018-10-30 20:59:46,095] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive, deep=True, remote_unchanged=False, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,097] DEBUG: Worker-0: Got task MergeDirectoryTask(/home/share/OneDrive, deep=True, remote_unchanged=False, parent_remote_unchanged=False).
[2018-10-30 20:59:46,098] DEBUG: Worker-0: Removing watcher for "/home/share/OneDrive"
[2018-10-30 20:59:46,099] DEBUG: MainThread: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:46,106] DEBUG: Worker-0: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:46,520] DEBUG: Worker-0: https://api.onedrive.com:443 "GET /v1.0/drives/1d759be3b0fedada/root:/:/children HTTP/1.1" 200 8526
[2018-10-30 20:59:46,533] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/#Documents in Share, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,533] DEBUG: Worker-1: Got task MergeDirectoryTask(/home/share/OneDrive/#Documents in Share, deep=True, remote_unchanged=True, parent_remote_unchanged=False).
[2018-10-30 20:59:46,535] DEBUG: Worker-1: Removing watcher for "/home/share/OneDrive/#Documents in Share"
[2018-10-30 20:59:46,540] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/#Doucuments, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,545] DEBUG: Worker-1: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:46,549] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/#WorkSpace in Share, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,567] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/#配置文件储存, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,571] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/Music, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,578] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/OneNote 笔记, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
127.0.0.1 - - [30/Oct/2018 20:59:46] "POST /EfXwoKLFc4?validationtoken=taMeb5bZq0SKcEQYVScZLA HTTP/1.1" 200 -
[2018-10-30 20:59:46,586] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/图片, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,592] DEBUG: Worker-0: Adding task MergeDirectoryTask(/home/share/OneDrive/电子邮件附件, deep=True, remote_unchanged=True, parent_remote_unchanged=False)...
[2018-10-30 20:59:46,593] DEBUG: Worker-0: Adding watcher for "/home/share/OneDrive"
[2018-10-30 20:59:46,593] DEBUG: Worker-0: Got task MergeDirectoryTask(/home/share/OneDrive/#Doucuments, deep=True, remote_unchanged=True, parent_remote_unchanged=False).
[2018-10-30 20:59:46,594] DEBUG: Worker-0: Removing watcher for "/home/share/OneDrive/#Doucuments"
[2018-10-30 20:59:46,598] DEBUG: Worker-0: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:46,854] DEBUG: MainThread: https://api.onedrive.com:443 "POST /v1.0/drives/1d759be3b0fedada/root:/:/subscriptions HTTP/1.1" 201 456
[2018-10-30 20:59:46,858] DEBUG: MainThread: Subscribed to root updates of drive 1d759be3b0fedada. Subscription ID: WLS_SubscriptionId_22ED9D74-5933-493B-9B1F-EF3D99D29CC3.
[2018-10-30 20:59:46,858] INFO: MainThread: Webhook for Drive 1d759be3b0fedada updated.
[2018-10-30 20:59:46,884] INFO: MainThread: Will use webhook to trigger sync events.
[2018-10-30 20:59:46,885] WARNING: MainThread: Executing <Handle gen_start_repo_tasks({'1d759be3b0fedada': [<onedrived.od...x7fe92c34bf60>]}) at /home/nathan/.local/lib/python3.7/site-packages/onedrived/od_main.py:129 created at /home/nathan/.local/lib/python3.7/site-packages/onedrived/od_main.py:207> took 0.791 seconds
[2018-10-30 20:59:46,955] DEBUG: Worker-1: https://api.onedrive.com:443 "GET /v1.0/drives/1d759be3b0fedada/items/1D759BE3B0FEDADA!1083/children HTTP/1.1" 200 8342
[2018-10-30 20:59:46,965] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Documents in Share/C++手册.scriv, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...
[2018-10-30 20:59:46,972] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Documents in Share/JavaSpring.scriv, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...
[2018-10-30 20:59:46,978] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Documents in Share/Markdown, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...

then if began to search for something to sync and add them to dued tasks:

[2018-10-30 20:59:48,328] DEBUG: Worker-1: Local file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Linux.scrivx" is different from when it was last synced. Upload it.
[2018-10-30 20:59:48,328] DEBUG: Worker-1: Adding task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Linux.scrivx)...
[2018-10-30 20:59:48,328] DEBUG: Worker-1: Adding watcher for "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv"
[2018-10-30 20:59:48,328] DEBUG: Worker-1: Got task MergeDirectoryTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv, deep=True, remote_unchanged=True, parent_remote_unchanged=True).
[2018-10-30 20:59:48,328] DEBUG: Worker-1: Removing watcher for "/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv"
[2018-10-30 20:59:48,329] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Snapshots, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...
[2018-10-30 20:59:48,329] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Settings, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...
[2018-10-30 20:59:48,329] DEBUG: Worker-1: Adding task MergeDirectoryTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Files, deep=True, remote_unchanged=True, parent_remote_unchanged=True)...
[2018-10-30 20:59:48,329] DEBUG: Worker-1: Local file "/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Tools & IDE 使用与教程.scrivx" is different from when it was last synced. Upload it.
[2018-10-30 20:59:48,329] DEBUG: Worker-1: Adding task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Tools & IDE 使用与教程.scrivx)...

but failed to upload them

[2018-10-30 20:59:52,671] INFO: Worker-1: Uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/104.rtf" to OneDrive.
[2018-10-30 20:59:52,673] DEBUG: Worker-1: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:52,873] DEBUG: Worker-0: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:52,875] ERROR: Worker-0: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:52,875] ERROR: Worker-0: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/17.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:52,877] DEBUG: Worker-0: Got task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/docs.checksum).
[2018-10-30 20:59:52,878] INFO: Worker-0: Uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/docs.checksum" to OneDrive.
[2018-10-30 20:59:52,880] DEBUG: Worker-0: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:53,079] DEBUG: Worker-1: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:53,080] ERROR: Worker-1: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,081] ERROR: Worker-1: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/104.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,082] DEBUG: Worker-1: Got task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/134.rtf).
[2018-10-30 20:59:53,083] INFO: Worker-1: Uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/134.rtf" to OneDrive.
[2018-10-30 20:59:53,085] DEBUG: Worker-1: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:53,438] DEBUG: Worker-0: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:53,438] ERROR: Worker-0: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,438] ERROR: Worker-0: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/docs.checksum":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,439] DEBUG: Worker-0: Got task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/133.rtf).
[2018-10-30 20:59:53,439] INFO: Worker-0: Uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/133.rtf" to OneDrive.
[2018-10-30 20:59:53,440] DEBUG: Worker-0: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:53,739] DEBUG: Worker-1: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:53,741] ERROR: Worker-1: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,741] ERROR: Worker-1: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/134.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,743] DEBUG: Worker-1: Got task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Files/Docs/21.rtf).
[2018-10-30 20:59:53,744] INFO: Worker-1: Uploading file "/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Files/Docs/21.rtf" to OneDrive.
[2018-10-30 20:59:53,746] DEBUG: Worker-1: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:53,896] DEBUG: Worker-0: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:53,897] ERROR: Worker-0: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,898] ERROR: Worker-0: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Linux.scriv/Files/Docs/133.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:53,899] DEBUG: Worker-0: Got task UploadFileTask(/home/share/OneDrive/#Doucuments/#编程/IDE & Tools 集锦.scriv/Files/Docs/55.rtf).
[2018-10-30 20:59:53,900] INFO: Worker-0: Uploading file "/home/share/OneDrive/#Doucuments/#编程/IDE & Tools 集锦.scriv/Files/Docs/55.rtf" to OneDrive.
[2018-10-30 20:59:53,902] DEBUG: Worker-0: Starting new HTTPS connection (1): api.onedrive.com:443
[2018-10-30 20:59:54,136] DEBUG: Worker-1: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:54,137] ERROR: Worker-1: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:54,137] ERROR: Worker-1: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/Tools & IDE 使用与教程.scriv/Files/Docs/21.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:54,437] DEBUG: Worker-0: https://api.onedrive.com:443 "PUT /v1.0/drives/1d759be3b0fedada/root:/ HTTP/1.1" 415 184
[2018-10-30 20:59:54,438] ERROR: Worker-0: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2018-10-30 20:59:54,438] ERROR: Worker-0: Error uploading file "/home/share/OneDrive/#Doucuments/#编程/IDE & Tools 集锦.scriv/Files/Docs/55.rtf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..

So hopefully someone could figure it out what I'm doing wrong or how to solve this. One thing I know is that ngrok official service is NEARLY out of range from my local environment. Anyway I'd like to use sstunel, self configured old ngrok or frp as an alternative, I'd seen if it's not possible to do so, thanks, just figure out!

@NathanIceSea
Copy link
Author

Meantime, should I use http & https proxy? Could it help?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant