Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Mist is not injecting web3 in the firfox browser #3702

Closed
1 task
pradeepchauhan7 opened this issue Feb 21, 2018 · 3 comments
Closed
1 task

Mist is not injecting web3 in the firfox browser #3702

pradeepchauhan7 opened this issue Feb 21, 2018 · 3 comments
Assignees

Comments

@pradeepchauhan7
Copy link

  • I've asked for help in the Mist Gitter before filing this issue.
Version: `0.9.3`
OS & Version: Ubuntu 17.10
Node version: `geth 1.8.1` 
Number of blocks synchronized: 1809344

html file:-

<script src="web3.js"></script> <script> if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); }

alert(web3.eth.accounts);
</script>

Error :-
SyntaxError: An invalid or illegal string was specified
inpage.js:10796
Loading failed for the <script> with source “file:///home/pradeep/testrpc/web3.js”.
test.html:2
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
test.html:14308:40198
Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8545.
test.html:14308:27650
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
test.html

@evertonfraga
Copy link
Member

Hi, I am not sure I understood your question.

What application are you using, Mist or Firefox? Can you send a screenshot?

Thanks!

@evertonfraga evertonfraga self-assigned this Mar 6, 2018
@pradeepchauhan7
Copy link
Author

Hey i am working on a dApp project but i want to connect a transaction with a already deployed contract the problem is that everytime i am sending a transaction metamask pop up generates to submit or to reject transaction. I do not want to see that pop up as if the user want to send a transaction why will he install metamask etc. I want to develope a dApp that should be user friendly and there should not be any metamask pop up and all to submit or reject the transaction any help from your side will be appreciated thank you in advance.

@evertonfraga
Copy link
Member

Hi, from what you told me, it has little to do with Mist.

If you are developing a dapp in Firefox and a Metamask transaction window popped up, you are possibly calling some function like MyContract.method.call(…) instead of MyContract.method(…)

I'll close this issue, please make good use of web3.js documentation, according to the version you are using:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants