Mikescher / AlephNote

Lightweight note taking client for Simplenote or Standard Notes (or simply local storage)
https://mikescher.github.io/AlephNote/
MIT License
196 stars 20 forks source link

StandardNotes, status 410 #210

Closed sn3akyb3ar closed 1 year ago

sn3akyb3ar commented 1 year ago

I guess they changed something?

AlephNote.Plugins.StandardNote.StandardNoteAPIException: Server returned status 410.
Message: 'Please update your client application.' ---> AlephNote.PluginInterface.Exceptions.RestStatuscodeException: Server sync.standardnotes.org returned status code: 410 : Gone
   at AlephNote.Common.Network.SimpleJsonRest.GenericTwoWay[TResult](Object body, String path, HttpMethod method, Int32[] allowedStatusCodes, String[] parameter)
   at AlephNote.Common.Network.SimpleJsonRest.PostTwoWay[TResult](Object body, String path, String[] parameter)
   at AlephNote.Plugins.StandardNote.StandardNoteAPI.Authenticate004(ISimpleJsonRest web, APIResultAuthParams apiparams, String mail, String uip, AlephLogger logger)
   --- End of inner exception stack trace ---
   at AlephNote.Plugins.StandardNote.StandardNoteAPI.Authenticate004(ISimpleJsonRest web, APIResultAuthParams apiparams, String mail, String uip, AlephLogger logger)
   at AlephNote.Plugins.StandardNote.StandardNoteAPI.Authenticate(ISimpleJsonRest web, String mail, String password, AlephLogger logger)
   at AlephNote.Plugins.StandardNote.StandardNoteConnection.RefreshToken(StandardNoteData dat)
   at AlephNote.Plugins.StandardNote.StandardNoteConnection.CreateAuthenticatedClient(StandardNoteData dat)
   at AlephNote.Plugins.StandardNote.StandardNoteConnection.StartSync(IRemoteStorageSyncPersistance idata, List`1 ilocalnotes, List`1 localdeletednotes)
   at AlephNote.Common.Repository.SynchronizationThread.DoSync(Boolean isImmediateResync)
Mikescher commented 1 year ago

Jep I get the same error:

Send:
{
  "email": ".....",
  "password": "......",
  "api": "20200115"
}

---------------------

Recieved:
{"error":{"message":"Please update your client application."}}

will look into it this weekend

btw sorry I didn't respond earlier - it seems github stopped sending me emails when issues are created?

Mikescher commented 1 year ago

Okay the corresponding check is here:

https://github.com/standardnotes/server/blob/d0c00e306e80078165876d79dadb047825a83ac5/packages/auth/src/Domain/UseCase/SignIn.ts#L68

Mikescher commented 1 year ago

The cli project has the same issue: https://github.com/jonhadfield/sn-cli/issues/33

Mikescher commented 1 year ago

Ok seems like the new flow seems to be (taken from the web app):

Then everything should work again - kinda annoying that this is not a new api version and is not even documented anywhere...

Mikescher commented 1 year ago

Matching line in app:

https://github.com/standardnotes/app/blob/28e43d37c00c5cd97129c4b83266f7a234bd9857/packages/snjs/lib/Services/Api/ApiService.ts#L235

Mikescher commented 1 year ago

Okay, it really looks like SN changed even more in the auth flow - this sucks....

(don't try the newest pre release, it doesn't work either)

Mikescher commented 1 year ago

Latest version v1.7.13 fixes it - it is a pretty ugly hack... but for the real solution we have to wait for the SN ticket