-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
WebDAV Nextcloud sync not working, continual upload try, but fails. #599
Comments
Thank you! I try to have a look later today! |
I was able to reproduce this behavior, but only with the wrong settings for the URL :) You need to make sure that the URL is correct e.g. that you actually set your username last. Could you maybe check them once more? I improved the error handling for this special case. It's a little misleading and also not correct (there is no way to force an update for webdav, that only works for dropbox sync). |
So I just got it working with another Nextcloud instance. The first setup uses a _ in the user name so, firstname_lastname - john_doe. I've used a different setup with username is lastnamefirstinitial - doej. I don't think the john_doe username is normal for nextcloud, however our org decided to use that for that instance. It appears to be an issue with the _ in the username. Not sure if programmatically that can be adjusted, but thought I'd let you know an update. |
But you haven't been unable to make the first instance work still? I am not sure about adjusting this programmatically, as it's not only supposed to work with nextcloud, but with WebDAV in general. But we definitely should provide some info about this, if we find out which patterns nextcloud uses. I didn't find anything apart from the info already provided in the api docs: https://docs.nextcloud.com/server/15/developer_manual/client_apis/WebDAV/basic.html#webdav-basics Maybe you have more luck. If we don't find the info we can also get in touch with them directly on how to find the address of the user directory reliably. |
@cb3inco ping |
Hi, after reading an article on heise.de I wanted to test this software by my own. Description seems to me great. To control the files on my own server is also great. Unfortunatly I also get a 503 error. I tried version 6.0.1 on Windows and on macOS. Im using Nextcloud server as well.
I would like to add log file. Where can I find the file on Windows and macOS? |
@sisyphosloughs are you running your own nextcloud instance? And the other apps all run fine with this instance, right (I am asking because there are a ton of issues out there referring to nextcloud + webdav + 503)? I am not sure how keypass manages the WebDAV URL. But it might be different from what Super Productivity does (which is nothing, to also allow for other providers to be used). The Url I entered looks like this: " |
@johannesjo Thanks for the replay. Here is how I put the URL: I tried another app: macOS finder is able to deal with that URL I pasted for a new server connection. Also pathfinder (a finder alternativ for macOS) can deal with the pasted URL. In superProductivity I tried some more:
On my nextcloud server I put the log into debug. Unfortunatly there are no entries, when superProducitivity tries to sync. I also clickend in the superProductivity settings on the link. And no, I do not use a different domain for my nextcloud server at all. What else might be wrong? So many apps wich cean deal with my nexcloud settings URL, but here it doesn't work. Stupid question: do you expect I hope it helps to trouble-shoot the issue. If you write me how I can access superProductivities log, I'll upload that. Regard's, Benjamin |
@sisyphosloughs Thank you for digging into this!! The
|
@johannesjo Thank you about the information how to enable developement settings. I hope I can provide some usuful informations. The console output is in the bottem. To be open: I'm not a software developer, but a technically quite interested person. So please be patient if I do not express myself technically correct. I grabed the console output from the netwok tab and replaced the domain name of my server with After activating the sync, this happens:
I'm a bit wondering that superPorducitiy tryes to 'get' the file from my server (
I hope that helped. Please ask me, if you need more informations. |
Thank you. I'm already in my pajamas and İ have a more in depth look tomorrow, but what happens if you create the file manually first? |
Hi, I didn't wanted to interrupt your rest! So please read it tomorrow!
I don't see any difference. The only thing I observed is, that now the URL has no |
I would need more info about the actual request itself if there is anything available. You can get that as described above. Here is more info about it in case you need it: This is a link to a similar issue for the library I am using for this: |
Hi there! I am also in the same boat with @sisyphosloughs getting 503 errors. I use the Snap version of SuperProductivity 6.0.1 and Nextcloud 19.0.4. I have (
Is there anything that I can help with trouble shooting the issue? |
@sm8ps thanks for the input and the offer! Is there any more info that might help us to find out what went wrong? What's inside Also, some more info about the client errors might be helpful. You can open up the console inside the app via Ctrl+Shift+i. You then use this guide to find out more about the requests: |
Thanks a lot for your consideration, @johannesjo! Nothing is written into the Nginx error log at all. I just double-checked and found out that there are indeed five steps recorded for an initial sync instead of the above mentioned three. Here they are with correspondence to the pop-up dialogues (log entry prior to pop-up message followed by action):
I have captured the full network log from the devtools as a .har-file which can be loaded back into devtools. Is there anything particular you are looking for or may I send it to you to look through it? I would not want to publish the full of it here (EDIT: and I do not have a real clue about what to look for). |
This might be related: |
Meanwhile I have tested if the reverse proxy relaying to the NC-server is to blame but the same behavior happens when trying to sync to the NC-server directly. However, the trick from keeweb/keeweb#492 solves the problem in a preliminary fashion. The following setting in 'config.php' makes the sync work:
The Nextcloud 'config.sample.php' it says about
So it does not seem very smart to opt out for every user agent. I can narrow down the regex for the user agent to something like
The main issue seems to be, according to the explanations from the developer tools, that Nextcloud does not set the cookies' SameSite attribute in a useful way. This is what I see in the devtools console of SuperProductivity:
From the explanations: It defaults to SameSite=Lax, which will prevent the cookie from being sent in a cross-site request in a future version of the browser. This behavior protects user data from accidentally leaking to third parties and cross-site request forgery. Resolve this issue by updating the attributes of the cookie:
Any opinion if this is a good enough (read: reasonably safe) work-around? |
Thanks for digging into this @sm8ps! Please let me know if there is anything I can do on Super Productivity's side of things to make this work better! |
The other thread mentions that upgrading nextcloud to NC 19 did fix the issue for them. Can somebody confirm this? |
Yes, it worked for me after updating Nextloud for 19.0.4. |
Though, I already am using Nextcloud 19.0.4. |
Well, it worked with Nextcloud 19.0.4 on macOS and Window. Unfortunatly on Android I still got the 503 error with the same settings. Strange. |
@sisyphosloughs did you whitelist app.super-productivity.com via WebAppPassword? |
@sisyphosloughs and @cb3inco, can you try my work-around with |
@sisyphosloughs @cb3inco ping. |
Thanks for the detailed reporting, helped me here with a similar NextCloud configuration problem. The configuration with '/' at the end of the base url works for me. Kudos to the helpful and responsive devs. |
Ran into this issue. Closed the app, sync'ed Nextcloud, and now I'm up and running |
Could you please describe your installation, @sunjam? Nextcloud version? Android client? Any special settings? |
Sure, I'm running Super Productivity Desktop app on Ubuntu Linux 20.04.2 LTS. I'm testing the the pre-release just merged a couple hours ago against Nextcloud 20.0.4 Stable with latest app updates. Created a one-time password within Nextcloud for the desktop app. Just started trying this for the first time, so I'm not sure why it sync'ed eventually... closing the app and letting Nextcloud sync the newly created json file seemed an important step afaik. |
Thanks! Sounds really promising. I shall try to follow as soon as I get around to upgrading my Nextcloud instance and then I will report back here. |
This issue has not received any updates in 90 days. Please comment, if this still relevant! |
After a long absence I finally got the chance to have a look at SuperProductivity in connection with my Nextcloud instance. And it works just fabulously! Syncing to NC 20 via WebDAV does work with version 7.2.1 from the Snap app as well as from the Android app. |
Thanks for the update @sm8ps ! Glad it works now! :) |
Hi! After looking at the conversation and the provided logs I tried something new (but maybe I missed something in this rather long thread). It seems as part of the problem in the first sync is that there is no file in the folder. So I made the folder SPsync and created an empty json file (my-sync-file.json) in Atom.io. Then I uploaded the file into the folder on NC before filling out the settings in the app. It works flawlessly - so part of the problem with the first sync is that there is no file and it seems as if the app is unable to create one (not sure if it's due to SP app or NC settings). |
Your Environment
Expected Behavior
Webdav should sync to Nextcloud
Current Behavior
Can't sync the file. Say's No remote data found. Upload local to Remote when selecting ok, error: An Error occurred while uploading your local data, try to force the update and just hitting ok, loops the process.
Steps to Reproduce (for bugs)
Console Output
main.8b59fe120f7989f6bc26.js:1 Persistence already allowed
main.8b59fe120f7989f6bc26.js:1 0 out of 206572 MiB used (0%)
main.8b59fe120f7989f6bc26.js:1 Migrating model "Task" to version from undefined to 3.3334 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "TaskRepeat" to version from undefined to 1 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "Task" to version from undefined to 3.3334 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "TaskRepeat" to version from undefined to 1 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "Tag" to version from undefined to 1 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "SimpleCounter" to version from undefined to 2 Object
main.8b59fe120f7989f6bc26.js:1 Object
main.8b59fe120f7989f6bc26.js:1 true Object
main.8b59fe120f7989f6bc26.js:1 WebDAV
main.8b59fe120f7989f6bc26.js:1 backupMeta Object
main.8b59fe120f7989f6bc26.js:1 backupData {"bookmark":{},"note":{},"metric":{},"improvement":{},"obstruction":{},"globalConfig":{"lang":{"lng":null},"misc":{"isDarkMode":true,"isConfirmBeforeExit":false,"isNotifyWhenTimeEstimateExceeded":false,"isAutMarkParentAsDone":false,"isAutoStartNextTask":true,"isTurnOffMarkdown":false,"isAutoAddWorkedOnToToday":false,"isDisableInitialDialog":false,"defaultProjectId":null,"firstDayOfWeek":0},"evaluation":{"isHideEvaluationSheet":false},"idle":{"isOnlyOpenIdleWhenCurrentTask":false,"isEnableIdleTimeTracking":true,"minIdleTime":300000,"isUnTrackedIdleResetsBreakTimer":true},"takeABreak":{"isTakeABreakEnabled":false,"isLockScreen":false,"isFocusWindow":false,"takeABreakMessage":"Take a break! You have been working for ${duration} without one. Go away from the computer! Take a short walk! Makes you more productive in the long run!","takeABreakMinWorkingTime":3600000,"motivationalImg":null},"pomodoro":{"isEnabled":false,"duration":1500000,"breakDuration":300000,"longerBreakDuration":900000,"cyclesBeforeLongerBreak":4,"isStopTrackingOnBreak":true,"isStopTrackingOnLongBreak":true,"isManualContinue":false,"isPlaySound":true,"isPlaySoundAfterBreak":false,"isPlayTick":false},"keyboard":{"globalShowHide":"Ctrl+Shift+X","globalToggleTaskStart":null,"globalAddNote":null,"globalAddTask":null,"addNewTask":"Shift+A","addNewNote":"n","openProjectNotes":"Shift+N","openDistractionPanel":"Shift+D","showHelp":"?","toggleBookmarks":"Shift+V","toggleBacklog":"b","goToWorkView":"w","goToSettings":null,"zoomIn":"Ctrl++","zoomOut":"Ctrl+-","zoomDefault":"Ctrl+0","taskEditTitle":"e","taskToggleAdditionalInfoOpen":"i","taskOpenEstimationDialog":"t","taskSchedule":"s","taskToggleDone":"d","taskAddSubTask":"a","taskDelete":"Delete","taskMoveToProject":null,"selectPreviousTask":"k","selectNextTask":"j","moveTaskUp":"Ctrl+Shift+ArrowUp","moveTaskDown":"Ctrl+Shift+ArrowDown","moveToBacklog":"Shift+B","moveToTodaysTasks":"Shift+T","expandSubTasks":null,"collapseSubTasks":null,"togglePlay":"y"},"localBackup":{"isEnabled":true},"sound":{"volume":75,"isPlayDoneSound":true,"isIncreaseDoneSoundPitch":true,"doneSound":"done2.mp3"},"trackingReminder":{"isEnabled":true,"isShowOnMobile":false,"minTime":120000},"sync":{"isEnabled":true,"syncProvider":"WebDAV","syncInterval":60000,"dropboxSync":{"authCode":null,"accessToken":null},"googleDriveSync":{"isAutoSyncToRemote":false,"isNotifyOnSync":false,"isLoadRemoteDataOnStartup":false,"isAutoLogin":false,"isCompressData":true,"syncFileName":"SUPER_PRODUCTIVITY_SYNC.json","_syncFileNameForBackupDocId":null,"_backupDocId":null},"webDav":{"baseUrl":"https://cloud.NEXTCLOUD.net/remote.php/dav/files/C_B/","userName":"C_B","password":"password","syncFilePath":"super-sync.json"}},"googleDriveSync":{"isEnabled":false,"isAutoLogin":false,"isAutoSyncToRemote":false,"isNotifyOnSync":false,"isLoadRemoteDataOnStartup":false,"isCompressData":true,"syncInterval":300000,"syncFileName":"SUPER_PRODUCTIVITY_SYNC.json","_backupDocId":null},"dropboxSync":{"isEnabled":false,"syncInterval":60000,"authCode":null,"accessToken":null,"_backupDocId":null},"__modelVersion":2},"reminders":[],"project":{"ids":["DEFAULT"],"entities":{"DEFAULT":{"id":"DEFAULT","title":"Super Productivity","isArchived":false,"issueIntegrationCfgs":{"JIRA":{"isEnabled":false,"_isBlockAccess":false,"host":null,"userName":null,"password":null,"isWonkyCookieMode":false,"isAutoPollTickets":true,"searchJqlQuery":"","isAutoAddToBacklog":true,"autoAddBacklogJqlQuery":"assignee = currentUser() AND sprint in openSprints() AND resolution = Unresolved","isWorklogEnabled":true,"isAutoWorklog":false,"isAddWorklogOnSubTaskDone":true,"isAllowSelfSignedCertificate":false,"isUpdateIssueFromLocal":false,"isShowComponents":true,"isCheckToReAssignTicketOnTaskStart":false,"storyPointFieldId":null,"isTransitionIssuesEnabled":true,"availableTransitions":[],"transitionConfig":{"OPEN":"DO_NOT","IN_PROGRESS":"ALWAYS_ASK","DONE":"ALWAYS_ASK"},"userToAssignOnDone":null},"GITHUB":{"repo":null,"token":null,"isSearchIssuesFromGithub":false,"isAutoPoll":false,"isAutoAddToBacklog":false,"filterUsername":null},"GITLAB":{"project":null,"token":null,"isSearchIssuesFromGitlab":false,"isAutoPoll":false,"isAutoAddToBacklog":false,"filterUsername":null}},"taskIds":[],"backlogTaskIds":[],"advancedCfg":{"worklogExportSettings":{"cols":["DATE","START","END","TIME_CLOCK","TITLES_INCLUDING_SUB"],"roundWorkTimeTo":null,"roundStartTimeTo":null,"roundEndTimeTo":null,"separateTasksBy":" | ","groupBy":"DATE"}},"theme":{"isAutoContrast":true,"isDisableBackgroundGradient":false,"primary":"#29a1aa","huePrimary":"500","accent":"#ff4081","hueAccent":"500","warn":"#e11826","hueWarn":"500"},"workStart":{},"workEnd":{},"breakTime":{},"breakNr":{}}},"__modelVersion":5.1},"tag":{"ids":[],"entities":{}},"simpleCounter":{"ids":["STANDING_DESK_ID","COFFEE COUNTER"],"entities":{"STANDING_DESK_ID":{"id":"STANDING_DESK_ID","title":"Standing Desk Timer","isEnabled":false,"icon":"airline_seat_recline_normal","iconOn":"directions_walk","type":"StopWatch","triggerOnActions":[],"triggerOffActions":[],"countOnDay":{},"isOn":false},"COFFEE COUNTER":{"id":"COFFEE COUNTER","title":"Coffee Counter","isEnabled":false,"icon":"free_breakfast","type":"ClickCounter","triggerOnActions":[],"triggerOffActions":[],"countOnDay":{},"isOn":false}}},"task":{"ids":[],"entities":{},"currentTaskId":null,"selectedTaskId":null,"taskAdditionalInfoTargetPanel":"Default","lastCurrentTaskId":null,"isDataLoaded":false},"taskArchive":{"ids":[],"entities":{}},"taskRepeatCfg":{"ids":[],"entities":{}},"lastActiveTime":1603267303704,"lastLocalSyncModelChange":1603267303704}
main.8b59fe120f7989f6bc26.js:1 IMPORT---> Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "Tag" to version from undefined to 1 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "SimpleCounter" to version from undefined to 2 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "TaskRepeat" to version from undefined to 1 Object
main.8b59fe120f7989f6bc26.js:1 Migrating model "Task" to version from undefined to 3.3334 Object
main.8b59fe120f7989f6bc26.js:1 sync(effect)..... SYNC_DBX_AFTER_ENABLE
cloud.NEXTCLOUD.net/remote.php/dav/files/C_B/super-sync.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)
main.8b59fe120f7989f6bc26.js:1 WebDAV ↑ Update Remote after no getRevAndLastClientUpdate()
main.8b59fe120f7989f6bc26.js:1 Refused to set unsafe header "Content-Length"
(anonymous) @ main.8b59fe120f7989f6bc26.js:1
main.8b59fe120f7989f6bc26.js:1 sync(effect)..... I_FOCUS_THROTTLED
cloud.NEXTCLOUD.net/remote.php/dav/files/C_B/super-sync.json:1 Failed to load resource: the server responded with a status of 503 (Service Unavailable)
main.8b59fe120f7989f6bc26.js:1 Error: Request failed with status code 503
at t.exports (main.8b59fe120f7989f6bc26.js:1)
at t.exports (main.8b59fe120f7989f6bc26.js:1)
at XMLHttpRequest.p.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (main.8b59fe120f7989f6bc26.js:1)
at XMLHttpRequest.D (polyfills.250ebd3af63450554a58.js:1)
at l.invokeTask (polyfills.250ebd3af63450554a58.js:1)
at Object.onInvokeTask (main.8b59fe120f7989f6bc26.js:1)
at l.invokeTask (polyfills.250ebd3af63450554a58.js:1)
at i.runTask (polyfills.250ebd3af63450554a58.js:1)
at u.invokeTask [as invoke] (polyfills.250ebd3af63450554a58.js:1)
at _ (polyfills.250ebd3af63450554a58.js:1)
(anonymous) @ main.8b59fe120f7989f6bc26.js:1
main.8b59fe120f7989f6bc26.js:1 WebDAV X Upload Request Error
main.8b59fe120f7989f6bc26.js:1 Refused to set unsafe header "Content-Length"
(anonymous) @ main.8b59fe120f7989f6bc26.js:1
cloud.NEXTCLOUD.net/remote.php/dav/files/C_B/super-sync.json:1 Failed to load resource: the server responded with a status of 503 (Service Unavailable)
main.8b59fe120f7989f6bc26.js:1 Error: Request failed with status code 503
at t.exports (main.8b59fe120f7989f6bc26.js:1)
at t.exports (main.8b59fe120f7989f6bc26.js:1)
at XMLHttpRequest.p.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (main.8b59fe120f7989f6bc26.js:1)
at XMLHttpRequest.D (polyfills.250ebd3af63450554a58.js:1)
at l.invokeTask (polyfills.250ebd3af63450554a58.js:1)
at Object.onInvokeTask (main.8b59fe120f7989f6bc26.js:1)
at l.invokeTask (polyfills.250ebd3af63450554a58.js:1)
at i.runTask (polyfills.250ebd3af63450554a58.js:1)
at u.invokeTask [as invoke] (polyfills.250ebd3af63450554a58.js:1)
at _ (polyfills.250ebd3af63450554a58.js:1)
(anonymous) @ main.8b59fe120f7989f6bc26.js:1
main.8b59fe120f7989f6bc26.js:1 WebDAV X Upload Request Error
main.8b59fe120f7989f6bc26.js:1 Service worker registration failed with: TypeError: Failed to register a ServiceWorker for scope ('file:///opt/superProductivity/resources/app.asar/dist/') with script ('file:///opt/superProductivity/resources/app.asar/dist/ngsw-worker.js'): An unknown error occurred when fetching the script.
(anonymous) @ main.8b59fe120f7989f6bc26.js:1
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/runtime.076604685350bc36956d.js.map:
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/polyfills.250ebd3af63450554a58.js.map:
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/main.8b59fe120f7989f6bc26.js.map:
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/styles.e1c786d55963a75bdeca.css.map:
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/reminder.5b0fa13d8ca10813efca.worker.js.map:
DevTools failed to load SourceMap: Could not load content for file:///opt/superProductivity/resources/app.asar/dist/lz.5d2c2359e92f65d00e61.worker.js.map:
Error Log (Desktop only)
The text was updated successfully, but these errors were encountered: