thesamim / TickTickSync

GNU General Public License v3.0
159 stars 12 forks source link

Login Failed error message #159

Closed dawnmariedigital closed 2 months ago

dawnmariedigital commented 2 months ago

Describe the bug A clear and concise description of what the bug is.

Receiving error message after inputting log-in credentials. Have tried changing my password twice and I still get a message.

To Reproduce Steps to reproduce the behavior:

  1. Go to TickTickSync settings & entered username and password.
  2. Click on 'log-in'
  3. See error

Expected behavior A clear and concise description of what you expected to happen. To be able to log-in.

Screenshots If applicable, add screenshots to help explain your problem. image

**Set up questions:

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

thesamim commented 2 months ago

If this is still happening, I suggest resetting your password on ticktick then trying to log in again from one device (eg: either desktop or phone) and seeing what happens.

Sometimes TickTick just resets itself....

TN-L commented 2 months ago

I second this issue. I had a synchronization problem and tried to reset the plugin by disabling it and logging in again. Now I am getting the same error message when logging in which previously worked fine. I have already changed the ticktick password to no success, both on desktop and mobile.

I am using version 1.0.32 of the plugin.

Edit: I also tried your suggestion in #157 with no change.

thesamim commented 2 months ago

@dawnmariedigital , @TN-L , @adanu:

In order for me to figure out what's going on I will need y'all's Logs.

From settings turn "Debug Mode" on, try logging in and send me your logs. (After deleting any sensitive data of course.)

To get to the logs: Cmd + Opt+ I on macOS or Ctrl + Shift + I on Windows or Linux.

Let me know if you need further clarification.

thesamim commented 2 months ago

@dawnmariedigital , @TN-L , @adanu:

Something else to try if you haven't gotten past the issue. Go to: https://www.unixtimestamp.com/

  1. In the "Enter Date and Time" section, put in the date you started using TickTick (roughly, it doesn't have to be exact.)
  2. Click on Convert
  3. Copy the Unix Time Stamp
  4. Look for the checkpoint entry in your data.json file (let me know if you need help finding it.)
  5. replace the value there with the value that you just copied.
  6. restart Obsidian

Let me know what happens.

TN-L commented 2 months ago

Thank you very much for your answer. Logging into the plugin did work briefly, but the login crashed again today. I have tried your suggested bugfix but it does not solve the issue.

TickTickSync
ms3056 commented 2 months ago

Errors have started - here is the console:

Bad JSON response
plugin:tickticksync:12748 Trying Text.
plugin:tickticksync:12751 Error:  
setError @ plugin:tickticksync:12751
makeRequest @ plugin:tickticksync:12693
await in makeRequest (async)
login @ plugin:tickticksync:12282
eval @ plugin:tickticksync:13193
(anonymous) @ app.js:1
plugin:tickticksync:12283 Signed in Response:  null
IMXeno123 commented 2 months ago

Lost my login state, can't log in now! @thesamim

plugin:tickticksync:12811 {"baseUrl":"ticktick.com","token":"[154BB8FE91...] len: 336"}
plugin:tickticksync:12747 Bad JSON response
plugin:tickticksync:12748 Trying Text.
plugin:tickticksync:12751 Error:  
setError @ plugin:tickticksync:12751
plugin:tickticksync:12856 ObjecterrorMessage: ""operation: "Get User Settings"statusCode: 429[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
initializeAPI @ plugin:tickticksync:12856
plugin:tickticksync:12865 Login failed! 
initializeAPI @ plugin:tickticksync:12865
plugin:tickticksync:23302 TickTickSync 1.0.32 loaded!

plugin:tickticksync:12747 Bad JSON response
plugin:tickticksync:12748 Trying Text.
plugin:tickticksync:12751 Error:  
setError @ plugin:tickticksync:12751
makeRequest @ plugin:tickticksync:12693
await in makeRequest (async)
login @ plugin:tickticksync:12282
eval @ plugin:tickticksync:13193
(anonymous) @ app.js:1
plugin:tickticksync:12283 Signed in Response:  null
jee-ee commented 2 months ago

@thesamim The API is returning a 429 because it has detected that the specified x-device has been used too many times.

@IMXeno123 As a temporary workaround, you can go into the folder of your vault and modify the file .obsidian/plugins/tickticksync/main.js and search for the two occurrences of x-device.

Replace the id 64f9effe6edff918986b5f71 by adding a few characters e.g 64f9effe6edff918986b5f71xxx and save the file. Reload Obsidian and things should work now.

ms3056 commented 2 months ago

Still 429 error for me. Change the 2 instances I found in the main.js file and shut Obsidian down and re-opened it.

thesamim commented 2 months ago

@jee-ee : Thanks for the pointer! I'm working on generating a correct device ID. If you have any suggestions, I would really appreciate it!

thesamim commented 2 months ago

@ms3056, @IMXeno123 , @TN-L , @jee-ee , https://github.com/badralbanna: Apologies if you get a notification for a message that was deleted. Long story short: The first solution I came up only partially worked. This solutions should work consistently

But, I still need help testing.

Warning: This is tested on Windows and Android. This will probably work on Mac and Linux. I hope it will work on iOS.

Caution: While the only thing that changed is the login method, I've only done basic testing with task management. Please make sure you back everything up including your TickTick tasks from TickTick before proceeding.

Process:

  1. Back up your current /.obsidian/plugins/TickTickSync folder
  2. Back up your TickTick tasks.
  3. Unzip the attached to the folder in step 1
  4. Test
  5. Let me know what happens please.

TickTickSync_ForTestingOnly_1.0.33.zip

Thanks in advance.

ms3056 commented 2 months ago
  1. Let me know what happens please.

This has worked for me in both directions, so far :) You are pretty awesome for helping us out - your plugin is a critical part of my workflow.

TN-L commented 2 months ago

Everything worked fine on Mac. Thank you so much for your quick help, really appreciate it.

NighteyesWolf commented 2 months ago

@ms3056, @IMXeno123 , @TN-L , @jee-ee , https://github.com/badralbanna: Apologies if you get a notification for a message that was deleted. Long story short: The first solution I came up only partially worked. This solutions should work consistently

But, I still need help testing.

Warning: This is tested on Windows and Android. This will probably work on Mac and Linux. I hope it will work on iOS.

Caution: While the only thing that changed is the login method, I've only done basic testing with task management. Please make sure you back everything up including your TickTick tasks from TickTick before proceeding.

Process:

  1. Back up your current /.obsidian/plugins/TickTickSync folder
  2. Back up your TickTick tasks.
  3. Unzip the attached to the folder in step 1
  4. Test
  5. Let me know what happens please.

TickTickSync_ForTestingOnly_1.0.33.zip

Thanks in advance.

Thank you so much. This worked on Mac (Sonoma version 14.7).

badralbanna commented 2 months ago

5. Let me know what happens please.

That fixed it for me as well (macOS Sonoma 14.3, Obsidian 1.6.7)!

Thank you for the quick fix. Echoing what has been said above, this has rapidly become a critical part of my workflow. Thanks for making and maintaining this!

thesamim commented 2 months ago

Thanks all for the feedback. Will be checking in the change and releasing shortly.

thesamim commented 2 months ago

@thesamim The API is returning a 429 because it has detected that the specified x-device has been used too many times.

When the release is out, please see the ## Acknowledgements of the README file. 😁

lukeavr commented 2 months ago

Hi there, just wanted to add another comment saying thank you so much for this plugin! My work life basically revolves around it

I've just tested using Windows 11, Obsidian 1.6.7, and IOS 18 (public beta) and the syncing seems to work in every direction from either device.

Thanks again!

thesamim commented 2 months ago

@lukeavr : Thanks! Particularly thanks for the iOS confirmation I was worried about that one since I don't have an iPhone to test with.

jee-ee commented 2 months ago

Sorry for the late reply but thank you very much for fixing the issue. Appreciate the shout-out!

ehearn88 commented 2 months ago

Thanks for the plugin and all the work on getting this bug fixed! I originally had login error 429; installed 1.0.33 and now getting login error 500. Tried re-installing plugin, also changing TickTick password. Big Sur 11.7

badralbanna commented 1 month ago

Unfortunately the 429 errors are back for me. This happening to anyone else?

Screenshot 2024-09-24 at 9 56 45 AM
NighteyesWolf commented 1 month ago

It's back for me too. I've tried both with the "testing" folder and with the original folder then running the plugin update.

Is there a way of disabling the notification bubbles for when this sort of thing happens?

thesamim commented 1 month ago

Tracking through https://github.com/thesamim/TickTickSync/issues/165

Is there a way of disabling the notification bubbles for when this sort of thing happens?

Only way would be to disable the plugin.