Demo project in order to reproduce the SHA-1 error.
The issue currently affects two of our developers and completely blocks them, we are available for testing and further evaluation and would be happy to help debug this.
Our System Versions yarn expo diagnostics
:
Expo CLI 2.6.12 evironment info:
System:
OS: macOS 10.14.1
Shell: 5.6.2 - /usr/local/bin/zsh
Binaries:
Node: 8.5.0 - /var/folders/2k/xv2xh80s2xgdcygqs21trrx00000gn/T/yarn--1544616660972-0.5345639070895056/node
Yarn: 1.12.3 - /var/folders/2k/xv2xh80s2xgdcygqs21trrx00000gn/T/yarn--1544616660972-0.5345639070895056/yarn
npm: 5.3.0 - ~/.cache/nvm/versions/node/v8.5.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ^31.0.2 => 31.0.6
react-native: https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz => 0.57.1
The only difference of the two systems here being the Xcode version installed 9.2/9C40b
.
We were able to reproduce the error on a fresh setup macOS System on first try.
We installed brew
from brew.sh
and ran:
brew install git yarn nvm watchman
git clone ...
yarn install
cd applications/demo-app
yarn ios
- We did try to close the iOS simulator at different times of this process to no avail.
- We also tried to reboot our systems before and after the
yarn install
as mentioned
During our research we collected the following links and evaluated/tried their suggestions:
As suggested by K999 on stackoverflow we
- cleaned several temp directory paths jump to the log,
- had
watchman
delete all its watches jump to the log and - we dropped all our
node_module
directories within the project jump to the log - we used the expo equivalent of
npm start -- --reset-cache
which isyarn start --clear
. jump to the log
We also ensured metro-react-native-babel-preset
is part of the babel preset config, which it is due to babel-preset-expo
.
In addition we also dropped our yarn cache jump to the log.
Yairopro on stackoverflow suggested to update the global installation of react-native-cli
, which in our case is not applicable as this is an expo project.
expo/expo#2743 - SHA-1 for file ..\node_modules\expo\AppEntry.js is not computed · Issue #2743 · expo/expo
As Slapbox himself suggested removing watchman
from the path did not solve the issue for us and the erroneous behaviour persisted.
facebook/react-native#19478 - [master iOS]Metro Bundler has encountered an internal error, please check your terminal error output for more details · Issue #19478 · facebook/react-native
As suggested by handeglc we dropped our node_module
directories throughout the project and reinstalled using yarn
to no avail.
facebook/metro#175 - [master iOS]Metro Bundler has encountered an internal error, please check your terminal error output for more details
We seem to have a similar issue as described here, though there have not been any actionable suggestions for us to try.
After initially running yarn start
we got the following output. The app seems to have started twice and then crashed due to SHA-1 error.
The logs of our fresh/initial yarn start
(click to show)
```plain
• Scan the QR code above with the Expo app (Android) or the Camera app (iOS).
• Press a for Android emulator, or i for iOS simulator.
• Press e to send a link to your phone with email/SMS.
Press ? to show a list of all available commands.
Logs for your project will appear below. Press Ctrl+C to exit.
[11:17:13] Finished building JavaScript bundle in 35347ms.
[11:17:14] Running application "main" with appParams: {"rootTag":1,"initialProps":{"exp":{"manifest":{"splash":{"resizeMode":"contain","image":"./assets/splash.png","backgroundColor":"#ffffff","imageUrl":"http://127.0.0.1:19001/assets/./assets/splash.png"},"developer":{"projectRoot":"/Users/fst/src/github.com/aidminutes/error-reproduction-demo/applications/demo-app","tool":"expo-cli"},"loadedFromCache":false,"privacy":"public","logUrl":"http://127.0.0.1:19000/logs","orientation":"portrait","sdkVersion":"31.0.0","mainModuleName":"node_modules/expo/AppEntry","env":{},"platforms":["ios","android"],"xde":true,"id":"@zetaron/demo-app","hostUri":"127.0.0.1:19000","iconUrl":"http://127.0.0.1:19001/assets/./assets/icon.png","assetBundlePatterns":["**/*"],"name":"demo-app","slug":"demo-app","debuggerHost":"127.0.0.1:19001","icon":"./assets/icon.png","isVerified":true,"packagerOpts":{"lanType":"ip","dev":true,"minify":false,"urlRandomness":"pa-2qs","hostType":"lan"},"ios":{"supportsTablet":true},"updates":{"fallbackToCacheTimeout":0},"bundleUrl":"http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=%2FUsers%2Ffst%2Fsrc%2Fgithub.com%2Faidminutes%2Ferror-reproduction-demo%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js","version":"1.0.0"},"initialUri":"exp://127.0.0.1:19000","appOwnership":"expo","shell":0}}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
[11:18:50] Finished building JavaScript bundle in 64ms.
[11:18:51] Finished building JavaScript bundle in 71ms.
[11:18:51] Finished building JavaScript bundle in 69ms.
[11:18:52] Finished building JavaScript bundle in 54ms.
[11:18:52] Running application "main" with appParams: {"rootTag":11,"initialProps":{"exp":{"manifest":{"splash":{"resizeMode":"contain","image":"./assets/splash.png","backgroundColor":"#ffffff","imageUrl":"http://127.0.0.1:19001/assets/./assets/splash.png"},"developer":{"projectRoot":"/Users/fst/src/github.com/aidminutes/error-reproduction-demo/applications/demo-app","tool":"expo-cli"},"loadedFromCache":false,"privacy":"public","logUrl":"http://127.0.0.1:19000/logs","orientation":"portrait","sdkVersion":"31.0.0","mainModuleName":"node_modules/expo/AppEntry","env":{},"platforms":["ios","android"],"xde":true,"id":"@zetaron/demo-app","hostUri":"127.0.0.1:19000","iconUrl":"http://127.0.0.1:19001/assets/./assets/icon.png","assetBundlePatterns":["**/*"],"name":"demo-app","slug":"demo-app","debuggerHost":"127.0.0.1:19001","icon":"./assets/icon.png","isVerified":true,"packagerOpts":{"lanType":"ip","dev":true,"minify":false,"urlRandomness":"pa-2qs","hostType":"lan"},"ios":{"supportsTablet":true},"updates":{"fallbackToCacheTimeout":0},"bundleUrl":"http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=%2FUsers%2Ffst%2Fsrc%2Fgithub.com%2Faidminutes%2Ferror-reproduction-demo%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js","version":"1.0.0"},"initialUri":"exp://127.0.0.1:19000","appOwnership":"expo","shell":0}}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
[11:18:54] Finished building JavaScript bundle in 54ms.
[11:18:55] Running application "main" with appParams: {"rootTag":21,"initialProps":{"exp":{"manifest":{"splash":{"resizeMode":"contain","image":"./assets/splash.png","backgroundColor":"#ffffff","imageUrl":"http://127.0.0.1:19001/assets/./assets/splash.png"},"developer":{"projectRoot":"/Users/fst/src/github.com/aidminutes/error-reproduction-demo/applications/demo-app","tool":"expo-cli"},"loadedFromCache":false,"privacy":"public","logUrl":"http://127.0.0.1:19000/logs","orientation":"portrait","sdkVersion":"31.0.0","mainModuleName":"node_modules/expo/AppEntry","env":{},"platforms":["ios","android"],"xde":true,"id":"@zetaron/demo-app","hostUri":"127.0.0.1:19000","iconUrl":"http://127.0.0.1:19001/assets/./assets/icon.png","assetBundlePatterns":["**/*"],"name":"demo-app","slug":"demo-app","debuggerHost":"127.0.0.1:19001","icon":"./assets/icon.png","isVerified":true,"packagerOpts":{"lanType":"ip","dev":true,"minify":false,"urlRandomness":"pa-2qs","hostType":"lan"},"ios":{"supportsTablet":true},"updates":{"fallbackToCacheTimeout":0},"bundleUrl":"http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=%2FUsers%2Ffst%2Fsrc%2Fgithub.com%2Faidminutes%2Ferror-reproduction-demo%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js","version":"1.0.0"},"initialUri":"exp://127.0.0.1:19000","appOwnership":"expo","shell":0}}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
[11:18:57] SHA-1 for file /Users/fst/src/github.com/aidminutes/error-reproduction-demo/applications/demo-app/.expo/__generated__/AppEntry.js is not computed
Building JavaScript bundle [ ] 0%
```
Following we show in order the steps we took, including their output, to resolve the issue.
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop
➜ watchman watch-del-all
{
"version": "4.9.0",
"roots": [
"/Users/fst/src/github.com/aidminutes/error-reproduction-demo",
]
}
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop
➜ watchman watch-del-all
{
"version": "4.9.0",
"roots": []
}
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop
➜ rm -rf ./node_modules ./**/node_modules ./**/.expo
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop took 9s
➜ yarn cache clean
yarn cache v1.12.3
success Cleared cache.
✨ Done in 18.64s.
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop took 19s
➜ rm -rf $TMPDIR/haste-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/yarn-*
The logs of yarn install
(click to show)
```bash
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop
➜ yarn install
yarn install v1.12.3
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @expo/[email protected]: The platform "darwin" is incompatible with this module.
info "@expo/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > expo > [email protected]" has incorrect peer dependency "[email protected]".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > expo > [email protected]" has incorrect peer dependency "react-native@^0.44.1".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > [email protected]" has unmet peer dependency "@babel/core@*".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > @babel/plugin-proposal-decorators > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-3e8e6cae-4a15-4bfa-9fc4-b41bd27e8b11 > demo-app > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-typescript > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
✨ Done in 82.68s.
```
error-reproduction-demo on master [⇡] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop took 1m 23s
➜ cd applications/demo-app
At this point we closed iOS simulator, to ensure a clean cache on its side too.
error-reproduction-demo/applications/demo-app on master [⇡!] is 📦 v0.1.0 via ⬢ v8.5.0 at ☸️ docker-for-desktop took 1m 5s
➜ yarn ios --clear
...
[11:42:05] Trying to open the project in iOS simulator...
[11:42:06] Opening iOS simulator
[11:42:09] Opening exp://127.0.0.1:19000 in iOS simulator
Press ? to show a list of all available commands.
[11:42:28] SHA-1 for file /Users/fst/src/github.com/aidminutes/error-reproduction-demo/applications/demo-app/.expo/__generated__/AppEntry.js is not computed
Building JavaScript bundle [ ] 0%