Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloaded dapp set to external network won't work #391

Closed
filippsen opened this issue Mar 17, 2019 · 1 comment
Closed

Downloaded dapp set to external network won't work #391

filippsen opened this issue Mar 17, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@filippsen
Copy link
Contributor

filippsen commented Mar 17, 2019

Environment/Browser

Lab 1.6.1.
Still valid on version 1.7.0.

Description

Downloaded Dapp includes undefined window.web3 code. This definition is unnecessary and overwrites the actual setting, making the code unable to connect to the server.

Steps to reproduce

  1. Create a new project from the Hello World template
  2. Set Custom network (in Select a Network button)* or any other network
  3. Deploy HelloWorld.sol
  4. Paste in the 12 word seed and proceed with deployment
  5. Open Preview panel
  6. Click Download DApp button
  7. Inspect the downloaded html file

*Running a custom network:

a) Run Ganache (desktop application)
b) Go to Settings gear icon;
c) In Server settings, set Port Number to 8545;
d) In Chain settings, set Gas Limit to 7900000.
e) Click SAVE AND RESTART
f) Copy the MNEMONIC (12-word seed) shown in the ACCOUNT screen

Expected result

Expected the Hello World example to run.

Actual result

Console output:

superblocks_dapp_hello.html: Using Superblocks web3 provider for endpoint: undefined

Renders with missing arguments.

Message:
Block number: 

How to solve it

Remove the following snippet from the output:

<script type="text/javascript">
    window.web3={currentProvider:new DevKitProvider.provider("undefined"),eth:{accounts:undefined}};                                                         
    console.log("Using Superblocks web3 provider for endpoint: undefined");
</script>
@filippsen filippsen added the bug Something isn't working label Mar 17, 2019
@filippsen filippsen changed the title Downloaded dapp set to Custom network won't work Downloaded dapp set to external network won't work Mar 17, 2019
@filippsen
Copy link
Contributor Author

Resolved with request #424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant