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

web3Enable promise stalled on first page load in extension-dapp #1236

Open
4 of 10 tasks
attemka opened this issue Mar 21, 2023 · 2 comments
Open
4 of 10 tasks

web3Enable promise stalled on first page load in extension-dapp #1236

attemka opened this issue Mar 21, 2023 · 2 comments
Labels
P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.

Comments

@attemka
Copy link

attemka commented Mar 21, 2023

  • I'm submitting a ...
  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

Current behavior: On first page load (e.g new window of chrome incognito mode) web3Enable function could freeze on it's execution.
Expected behavior: URL authorization window popup is shown when web3Enable function is fired.
STR:

  1. Create any react project (e.g CRA 5.x.x).
  2. Add the extension connection code:
 const connectWallet = async () => {
    console.log('Web3 Injected: ' + isWeb3Injected)
    const allInjected = await web3Enable('my cool dapp');
    const allAccounts = await web3Accounts();
    console.log(allAccounts)
  }        

And the button which will execute it on click.
4. Open new incognito window in chrome and go to the app page.
5. Click the connection button. You'll see no action, even though it will be "Web3 Injected: true" in the console.
6. Refresh the page and try again. You'll see normal behavior from now on.

Couldn't be reproduced in firefox browser.

  • What is the motivation for changing the behavior?

User should be able to connect the extension even on new incognito window.

Please tell us about your environment:

  • OS: macOS 13.2.1
  • Browser: Chrome 111.0.5563.64 (Official Build) (arm64), new incognito window, all extensions except for polkadot-js are disabled
  • Extension version: 0.44.1
  • Code setup: CRA 5.0.1
  • Version: 0.44.1

  • Environment:

    • Node.js
    • Browser
    • Other (limited support for other environments)
  • Language:

    • JavaScript
    • TypeScript v4.9.5
    • Other
@attemka attemka changed the title Enable promise stalled on first page load in extension-dapp web3Enable promise stalled on first page load in extension-dapp Mar 21, 2023
@niklasp
Copy link

niklasp commented Apr 20, 2023

Same issue here

@TarikGul
Copy link
Member

Is this still an issue?

@TarikGul TarikGul added the P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first. label Oct 30, 2024
@TarikGul TarikGul moved this to P4 - Needs Investigation in Polkadot-js general project board Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.
Projects
Status: P4 - Needs Investigation
Development

No branches or pull requests

3 participants