joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Display an error message when the mobile note editor fails to load

Open personalizedrefrigerator opened this issue 5 months ago • 1 comments

Operating system

Android

Joplin version

2.14.10

Desktop version info

No response

Current behaviour

Currently, when the note editor is loaded on a device with an incompatible version of the Android System WebView (or iOS), the editor is blank.

Expected behaviour

We should display an error message.

On Android:

  • Explain how to update the Android System WebView
  • Give the user the option to switch to the plain editor.

On iOS:

  • Give the user the option to switch to the plain editor.

Depending on what's causing the issue, we may also want to look into transpiling CodeMirror with babel or adding polyfills.

Logs

No response

I'm getting a syntax error when loading the note editor on Safari 11.1 (it doesn't support a?.b syntax): screenshot: Line beginning with result.selectionLine = ...

The above testing was done on a browserstack.com free account (which seems to only allow 1 minute of testingper browser version). We may be able to fix this by setting the Webpack compilation target to ES5: https://stackoverflow.com/a/64528815.

Edit: The issue seems to be related to the vim emulation package, which we also use for CodeMirror 5 emulation. If the issue is in a plain .js file, we may need to use babel-loader to transpile (rather than relying on TypeScript).

Edit 2: Using babel-loader does seem to fix the issue. I've enabled Babel loader in this branch. I plan to create a pull request after doing more testing.

Not sure if this is fully fixed but I suggest leaving it aside for now in any case. If we still get bug reports about this from users we can reconsider

laurent22 avatar Apr 15 '24 14:04 laurent22