starknet-remix-plugin icon indicating copy to clipboard operation
starknet-remix-plugin copied to clipboard

Remix runtime errors

Open kbachnik opened this issue 2 years ago • 19 comments

After adding and activating the plugin I give permissions 4 times. Then in Starknet logo left sidebar I see this error :

Uncaught runtime errors:
×
ERROR
Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at Object.get (https://cairo-remix-test.nethermind.io/static/js/bundle.js:7259:18)
    at https://cairo-remix-test.nethermind.io/static/js/bundle.js:2926:76
    at commitHookEffectListMount (https://cairo-remix-test.nethermind.io/static/js/bundle.js:47780:30)
    at commitPassiveMountOnFiber (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49273:17)
    at commitPassiveMountEffects_complete (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49245:13)
    at commitPassiveMountEffects_begin (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49235:11)
    at commitPassiveMountEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49225:7)
    at flushPassiveEffectsImpl (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51110:7)
    at flushPassiveEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51062:18)
    at performSyncWorkOnRoot (https://cairo-remix-test.nethermind.io/static/js/bundle.js:50279:7)
ERROR
Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at Object.get (https://cairo-remix-test.nethermind.io/static/js/bundle.js:7259:18)
    at https://cairo-remix-test.nethermind.io/static/js/bundle.js:2926:76
    at commitHookEffectListMount (https://cairo-remix-test.nethermind.io/static/js/bundle.js:47780:30)
    at commitPassiveMountOnFiber (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49273:17)
    at commitPassiveMountEffects_complete (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49245:13)
    at commitPassiveMountEffects_begin (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49235:11)
    at commitPassiveMountEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49225:7)
    at flushPassiveEffectsImpl (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51110:7)
    at flushPassiveEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51062:18)
    at performSyncWorkOnRoot (https://cairo-remix-test.nethermind.io/static/js/bundle.js:50279:7)
ERROR
Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at Object.get (https://cairo-remix-test.nethermind.io/static/js/bundle.js:7259:18)
    at https://cairo-remix-test.nethermind.io/static/js/bundle.js:2926:76
    at commitHookEffectListMount (https://cairo-remix-test.nethermind.io/static/js/bundle.js:47780:30)
    at commitPassiveMountOnFiber (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49273:17)
    at commitPassiveMountEffects_complete (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49245:13)
    at commitPassiveMountEffects_begin (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49235:11)
    at commitPassiveMountEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:49225:7)
    at flushPassiveEffectsImpl (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51110:7)
    at flushPassiveEffects (https://cairo-remix-test.nethermind.io/static/js/bundle.js:51062:18)
    at performSyncWorkOnRoot (https://cairo-remix-test.nethermind.io/static/js/bundle.js:50279:7)

In Plugin Manager Permissions - No Permission requested yet.

How to fix this?

kbachnik avatar Sep 23 '23 09:09 kbachnik

@kbachnik quick question, are you using Brave with Shields on?

EdgarBarrantes avatar Sep 24 '23 18:09 EdgarBarrantes

@kbachnik quick question, are you using Brave with Shields on? No, just Chrome

kbachnik avatar Sep 25 '23 09:09 kbachnik

@kbachnik, can we ask you for a few more details of this behaviour? We suspect what may be the problem, but to be clear, would you like to fill in the details as per below?

To Reproduce Steps to reproduce the behavior (from a clean start):

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

NOTE: Please clearly indicate the time (with timezone or in UTC) when you have observed the error.

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

Cairo files Please include the Cairo source file.

Starknet Remix Plugin details

  • Are you using the default Starknet plugin from Remix marketplace, or any self-configured plugin instance?
  • What Environment are you using (Remote/Local Devnet, a wallet configuration)?

Host system (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari], any nonstandard browser plugins/adblocks
  • Version [e.g. 22]

stranger80 avatar Sep 25 '23 15:09 stranger80

Go to: https://remix.ethereum.org/#lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.18+commit.87f61d96.js image

Click on : Plugin Manager image

Searching: Starknet image

Click on Activate

Permissions Accept : image

Write file permission error: Error from IDE : [TIMEOUT] Timeout for call writeFile from Starknet image

Checking the Permissions tab : image

Checking the Straknet logo on the sidebar : image

Then i refreshed the page and checked the Starknet logo again : image


Second try

Go to: https://remix.ethereum.org/#lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.18+commit.87f61d96.js image

Click on : Plugin Manager image

Searching: Starknet image

Click on Activate

First Permission Accept : image

Second Repmission Accept : image

Tird Repmission Accept : image

Fourth Repmission Accept : image

Write file permission error: Error from IDE : [TIMEOUT] Timeout for call writeFile from Starknet image

Checking the Permissions tab : image

Checking the Straknet logo on the sidebar : image

Then i refreshed the page and checked the Starknet logo again : image

===============================================================================

I am using this instruction from nethermind-eth https://medium.com/nethermind-eth/unlocking-onboarding-to-starknet-an-overview-of-the-starknet-remix-plugin-6b0658e73521

The time, when i indicate the Error - 00:50-01:05UTC

Im using the default Starknet plugin from Remix

Im using a wallet configuration

All Cairo files that i have : hello_world.zip

System Spec : OS - Windows 11 Version 10.0.22621 Build 22621 Browser - Chrome Version 116.0.5845.188 (Official Build) (64-bit)

kbachnik avatar Sep 26 '23 01:09 kbachnik

@kbachnik thank you for your patience in getting all the details to us! Your attempts appear to have coincided with plugin backend outages which we have experienced during the last few days. We believe we have rectified these now - would you like to give the plugin another spin and confirm it is now compiling as expected?

stranger80 avatar Sep 26 '23 18:09 stranger80

hello! I am getting a similar error.

To Reproduce Steps to reproduce the behavior (from a clean start):

Go to Remix. Since we're using Brave, turn off 'Shields Up'. Re-open Remix. Click on the extensions and search for the StarkNet plugin. Click on the StarkNet plugin. image

See error: The plugin appears activated, but it doesn't redirect to the permissions window, and there's no option to compile the Cairo contract.

henryf10h avatar Sep 26 '23 19:09 henryf10h

@kbachnik thank you for your patience in getting all the details to us! Your attempts appear to have coincided with plugin backend outages which we have experienced during the last few days. We believe we have rectified these now - would you like to give the plugin another spin and confirm it is now compiling as expected?

image

Same error today

kbachnik avatar Sep 27 '23 03:09 kbachnik

@henryf10h An empty plugin panel indicates the plugin hasn't loaded. This can be caused by connectivity problems - the following link must work from your browser, and must return a blank screen (with React-related HTML markup visible in page source): https://cairo-remix-test.nethermind.io/ . Can you test that and confirm the URL responds correctly.

Note: The plugin, when launched, must be able to connect to following URLs as well:

  • https://cairo-compile-remix-test.nethermind.io/health should respond with OK
  • https://starknet-devnet-dev.nethermind.io/feeder_gateway/get_transaction_status?transactionHash=0xbadfad should respond with {"tx_status":"NOT_RECEIVED"}

Note2: I see in your URL bar that you have been trying to connect to Remix/Starknet plugin using an external link, with incorrect activate parameter - the correct value is activate=Starknet (as opposed to activate=Starknet-cairo1-compiler on your screenshot). In other words, you seem to be using an old external reference link - the correct one is: https://remix.ethereum.org/#activate=Starknet

stranger80 avatar Sep 28 '23 06:09 stranger80

@kbachnik we were digging a bit deeper in the symptoms you are observing. The stacktrace error indicates that the browser is blocking access to localStorage element of the webpage. Possible causes are:

  • Chrome is launched in incognito mode
  • Chrome setting "Block third-party cookies" is activated (see chrome://settings/cookies): image

Note: even with "Block third-party cookies" activate, exceptions can be added to a whitelist - the whitelist must include: - https://remix.ethereum.org - https://cairo-remix-test.nethermind.io

  • ...also see this link for potential hints.

I hope this helps now.

stranger80 avatar Sep 28 '23 07:09 stranger80

Hello @stranger80 , So far, I have done the following:

  1. I went to https://cairo-remix-test.nethermind.io/ and I still got a white screen. image
  2. Then I connected to the next two links you have suggested to me, in both cases I got the expected responses ('ok' and '{"tx_status":"NOT_RECEIVED"}').
  3. finally I go to the final link https://remix.ethereum.org/#activate=Starknet and I still can not see anything to compile. image
  4. I noted, when I go to the final link, I get defaulted the following link: https://remix.ethereum.org/#activate=Starknet&lang=en&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.18+commit.87f61d96.js It seems to be using a solidity's compiler version.

henryf10h avatar Sep 28 '23 10:09 henryf10h

@henryf10h would you like to join our Telegram channel (as posted on the repo's main README.md header)? Seems like something is interfering with js code on the Remix page, but that requires more sophisticated debugging (eg. clear the js console and network traces, restart Remix UI from the https://remix.ethereum.org/#activate=Starknet and watch Console and Network for errors...)

Also, do other Remix plugins launch for you (eg. Tenderly)?

stranger80 avatar Sep 28 '23 11:09 stranger80

I cleared js console and network traces. After restarting I got the following errors: image image image image image

henryf10h avatar Sep 28 '23 13:09 henryf10h

@henryf10h @kbachnik by any chance, are any other Remix plugins working for you right now?

You might want to try using a VPN, there has been issues reported in our telegram regarding the list of plugins not showing due to location restrictions.

EdgarBarrantes avatar Sep 28 '23 14:09 EdgarBarrantes

@EdgarBarrantes other Remix plugins work well I have tried all the steps with VPN enabled but the error remains the same

kbachnik avatar Sep 29 '23 04:09 kbachnik

ok, I just used VPN, and I still get the same.

pd: I can not see other plugins such as tenderly.

henryf10h avatar Sep 29 '23 11:09 henryf10h

Thanks for your patience and reports :)

@henryf10h, could you try out connecting to a different server? E.g.: France, USA? If you can't see the other plugins it's most likely the location issue reported in Telegram unrelated to this plugin.

@kbachnik, do you think you could clean cache ("Clear site data" in the Application tab in developer tools) and reload, we made some changes that should fix the timeout (we're working on more optimisations), also, be sure you're not getting running in incognito mode / blocking 3rd party cookies like stranger80 said. Thanks a lot.

EdgarBarrantes avatar Oct 03 '23 07:10 EdgarBarrantes

@EdgarBarrantes Same error image

kbachnik avatar Oct 03 '23 12:10 kbachnik

Hello @EdgarBarrantes ,

I still get the same blank page even if I set the VPN to USA.

image

henryf10h avatar Oct 03 '23 12:10 henryf10h

Hello team, Is there any clue what could be happening? I have been trying to connect from different vpn's locations. Is there a remix tool that supports cairo in VSC?

henryf10h avatar Oct 16 '23 14:10 henryf10h