Script error on some iOS browsers

Twine Version: Twee3
Story Format: Sugarcube 2.36.1


I have very recently started using Tweego to compile Twee3 stories (with the amazing twee3 Language Tools VS Code extension).

The exported HTML runs without problems on the desktop. However, when I uploaded it on my website and ran it on the iOS, it became complicated.

Brave browser on iOS gives me this error 3 times:

and right after, it gives me this:

Then, the game runs without any apparent issues.

Firefox for iOS just gives me this once:

Chrome iOS doesn’t seem to complain. Neither does Safari iOS.

Also, nothing shows on the console of desktop browser (I checked Brave for MacOS).

Do you suspect the problem comes from my Twine code or some setting? (I will try stripping the code down to the bare minimum and see if I keep getting the error.) Also, note: passage contents and passage names are in Greek, in case it has anything to do with that.

Any ideas?

The error message in the 2nd of the images you included state some JavaScript code is trying to access the selectedAddress property of an ethereum object, which in turn is a property of the global window object that is made available by the web-browser.

I am unable to find any reference to an ethereum object within the JavaScript based engine code of the SugarCube story format itself.

Have you added any custom JavaScript code to your project that includes an ethereum object?

Are you accessing your web-site via a MetaMask (like) app, or have a related web-browser extension installed?

No, I haven’t added any JS in the Twine proj.

Not sure. :roll_eyes: Are you saying it could have to do with my website (a

In that case, I can try uploading the same HTML file on, to see what happens…

What puzzles me is that I have done the same thing with other little Twine projects, without getting the error.

Are you saying it could have to do with my website (a

Yes, that’s possible. If I’m being suspicious, I worry that your wordpress setup might be compromised with some kind of cryptocurrency malware.

1 Like

!!! :scream:

There’s only one true browser engine on iOS, iOS Safari, every other browser is just a shell around it. Errors vs. no-errors is likely due to some shells blocking the offending code—which is definitely not part of SugarCube.

I don’t have much to add on the errors other than:

  • Ethereum is a cryptocurrency.
  • ethereum.selectedAddress is an API from an Ethereum wallet API.

So, I’m inclined to suspicions similar to @zarf .


Thanks, all! I’ve contacted my host about it. :crossed_fingers: