Skip to content

Commit

Permalink
[1984] Fixing Invalid value for 'projectId': "undefined" error [Andro…
Browse files Browse the repository at this point in the history
…id] [iOS] (#2051)

ref: #1984

Since infura 5.x.x empty string is invalid project id. Exception is thrown at launch `[Error: Invalid value for 'projectId': "undefined"] `. This leads to confusion for Non-Metamask users who try to get the project compiled. Changing default value to `MM_INFURA_PROJECT_ID="null"` will stop the exception. Restores behaviour to prior infura update.

 Non-Metamask users will still not be able to connect to any network. I make a note of this is README.md

(cherry picked from commit 4a3b463b936fb3d3f5ba02259a516db81a584016)
  • Loading branch information
stringcode86 authored Dec 14, 2020
1 parent 12cca4a commit c905221
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
export MM_PUBNUB_SUB_KEY=""
export MM_PUBNUB_PUB_KEY=""
export MM_OPENSEA_KEY=""
export MM_INFURA_PROJECT_ID=""

# NOTE: Non-Metamask only, will need to create an account and generate
# API key at https://infura.io in order to connect to main and test nets.
# More info: https://github.com/MetaMask/metamask-mobile/issues/1984

export MM_INFURA_PROJECT_ID="null"
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ yarn install # this will run a lengthy postinstall flow
cd ios && pod install && cd .. # install pods for iOS
```

- _Non-MetaMask Only:_ In the project root folder run
```
cp .ios.env.example .ios.env && \
cp .android.env.example .android.env && \
cp .js.env.example .js.env
```
- _Non-MetaMask Only:_ Create an account and generate your own API key at [Infura](https://infura.io) in order to connect to main and test nets. Fill `MM_INFURA_PROJECT_ID` in `.js.env`. (App will run without it, but will not be able to connect to actual network.)

- Then, in one terminal, run:

```bash
Expand Down

0 comments on commit c905221

Please sign in to comment.