standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
196 stars 9 forks source link

Errors in Safari (Mac) #564

Closed tmoravec closed 1 year ago

tmoravec commented 5 years ago

There are several problems with the web version in Safari (OS X Mojave 10.14.5, Safari 12.1.1).

  1. Tags don't load in the Add tags... part below the note title.
  2. Note content is blank in other editors than the plain one. Presumably, that's related to the fonts errors below.
  3. There are many JS errors.
  4. Filesafe doesn't show any uploaded files.

On load, I see 280 errors. Most of them are related to Content Security Policy for fonts:

Refused to load data:font/woff;base64,d09GRgABAAAAAIt0ABEAAAABQDwAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHUE9TAAABgAAACLoAABJKv3bHbEdTVUIAAAo8AAAAUwAAAHCOOI56T1MvMgAACpAAAABcAAAAYNmuqmljbWFwAAAK7AAAAIEAAAC0jBiQAGN2dCAAAAtwAAAAKwAAAC4G9xijZnBnbQAAC5wAAAOBAAAG5XJackBnYXNwAAAPIAAAAAwAAAAMABIAGGdseWYAAA8sAABYNwAAw2DADxfjaGVhZAAAZ2QAAAA2AAAANvyc8iNoaGVhAABnnAAAAB8AAAAkD7YHdWhtdHgAAGe8AAACCwAAA25yNU6fa2VybgAAacgAAB0cAABXGD87P7Jsb2NhAACG5AAAAb4AAAG+rN9/im1heHAAAIikAAAAIAAAACAB1wf5bmFtZQAAiMQAAADJAAABeBwnOJpwb3N0AACJkAAAAZYAAAJBVuQNNnByZ...CRYydOnTl34dKVazdu3bn34NGTZy9evXn34dOXbz9+/fkXEhYRFROXkCwRBA/LYUABAAD3Td3+ZW3bnTp2LrFt2+bEPMdOztkNF+T65bd2KTb8ESNSumJ54aIIy35KdORYtFT/9Fp3KEOJUyfO5Cg3bFCFm26Jc9uoO4aMmDRm3IRNd82YMq3SPQfizZs1575tu/576IFHnnjsqSzPvPDcS6+88dpb72x576MPPvnisybZvvnqux927GmxoEq1RWuW1KjVoFGfOvX6/dWhU1u4ZF+X7nA5XAlXw7VwPdw4H4tfqI8Pe2lepoGBowGUdmFxLS3K50ovSixL1UtOLE7lTclMLUotziwG87gSk0tLIBL8yZlFyaW5aTmpFWA+Z1FmXjpEUUlmTgpEEQDcm4MFAAC5CAAIAGMgsAEjRCCwAyNwsBRFICCwKGBmIIpVWLACJWGwAUVjI2KwAiNEswkKAwIrswsQAwIrsxEWAwIrWbIEKAZFUkSzCxAEAisA because it does not appear in the font-src directive of the Content Security Policy.

There are others, though (CSP again?):

[Error] Unable to post message to https://extensions.standardnotes.org. Recipient has origin https://app.standardnotes.org.

    postMessage
    postMessage (dist.js:21947)
    onReady (dist.js:21858)
    handleMessage (dist.js:21813)
    messageHandler (dist.js:21784)
    (anonymous function) (dist.js:21803)
[Error] Unable to post message to https://extensions.standardnotes.org. Recipient has origin https://app.standardnotes.org.

    postMessage
    postMessage (dist.js:215)
    onReady (dist.js:126)
    handleMessage (dist.js:81)
    messageHandler (dist.js:52)
    (anonymous function) (dist.js:71)

Another one, unexpected EOF:

[Error] SyntaxError: JSON Parse error: Unexpected EOF
    parse (dist.js:21783)
    messageHandler (dist.js:21783)
    (anonymous function) (dist.js:21803)
[Error] SyntaxError: JSON Parse error: Unexpected EOF
    parse (dist.js:51)
    messageHandler (dist.js:51)
    (anonymous function) (dist.js:71)

And some 404s:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (dist.js.map, line 0) https://extensions.standardnotes.org/assets/sn-filesafe/dist/dist.js.map
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (dist.js.map, line 0) https://extensions.standardnotes.org/assets/sn-advanced-markdown-editor/dist/dist.js.map
moughxyz commented 5 years ago

Hmm..I don't see any of these issues. In your case they're all the same issue: CSP, as you mentioned. It seems like none of your extensions are loading properly. Do themes work if you try to activate one? Do any of the editors work, besides the Advanced Markdown?

I'm testing on macOS 10.14.4 and Safari 12.1. An update away from your versions, though I doubt that would make a difference. I'll queue an update for my system and run the tests again.

tmoravec commented 5 years ago

Do themes work if you try to activate one?

Yes. I tried Solarized Dark and Titanium and both appear to be working.

Do any of the editors work, besides the Advanced Markdown?

Nope. I tried Vim Editor and the new Bold Editor and neither shows the note content. They show their own UI though (the Bold/Italic/Underscore buttons etc.)

tmoravec commented 5 years ago

Turns out it was the Grammarly plugin. I'm sorry for not trying it earlier - this is the first app that was broken by it. Honestly, I don't know where is the root of the problem, whether in SN or the plugin, but apparently the number of users affected is quite small.

moughxyz commented 5 years ago

Oh wow, interesting! I wonder why that happens. Good to know in either case.