npx expo start --tunnel : [ERR_UNKNOWN_ENCODING]: Unknown encoding: base64url - npm

When trying to launch expo strart through an ngrok tunnel, I get the following error :
$ npx expo start --tunnel
Starting project at C:\Users\xxx\xxx\xxx
Starting Metro Bundler
CommandError: TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: base64url
I am on Windows and I'm using expo sdk 46 at it's latest version and #expo/ngrok#^4.1.0. This error does not occur when trying to load npx expo start locally. Any idea why this may be happening?

base64url encoding was added in Node.js 16.0.0. Try upgrading Node if you are on an older version.

Related

expo cli warning: 'unrecognised event type: transformer_load_started

I'm getting a weird warning when I start newly created expo projects using expo init and expo start. The project loads and I am able to work, but I get this warning:
Unrecognized event: {"type":"transformer_load_started"}
Unrecognized event: {"type":"transformer_load_done"}
I have no idea what this means or what caused this. When I load up older projects using expo start, I do not get this error.
Any ideas on how to fix this? Thanks.
I have the same issue with just a simple project.
With some experimentation, I found that it caused by my Expo version which is "expo": "^45.0.0" in packages.json
Initializing your new projects with Expo SDK 44 by using this command should fix the issue:
expo init --template blank#44.0
Maybe it will be fixed in a Expo SDK 45 update.
EDIT:
I updated expo-cli to the last version (5.4.12) with npm install -g expo-cli and it fixed the issue with Expo 45.

- react-native-gesture-handler - expected version: ~2.1.0 Error After Installing Expo SDK 44

After A fresh Install of a new expo app which comes with Expo 44, I am receiving this error after trying to install reanimated.
The error appears in the terminal after running npm start
kindly assist
The error is as follows:
Some dependencies are incompatible with the installed expo package version:
- react-native-gesture-handler - expected version: ~2.1.0 - actual version installed: 2.2.0```
The same error i was getting i did run the following command and it got fixed automatically by expo doctor
expo doctor --fix-dependencies

Getting Building iOS bundle error when trying to build an android app - expo -react-native

I was able to build app using expo build:android previously. However, after upgrading to latest expo version I get following error:
connect ECONNREFUSED 127.0.0.1:19001
Set EXPO_DEBUG=true in your env to view the stack trace.
I also see the following lines in the log:
Publishing to channel 'default'...
Building iOS bundle
I don't added ios to my app.json, I only need to build an android apk. To do that I use expo build:android -t app-bundle
I also removed package-lock.json and node_modules and run npm install, but I get the same error.
I run expo start on another cmd and then run expo build:android -t app-bundle still get same error
Also when I clear expo cache, see the following log:
Restarting Metro Bundler...
Starting Metro Bundler on port 19001.
Couldn't adb reverse: adb.exe: error: Invalid source port: 'undefined'
I had faced same issue myself and found the solution. Expo is looking for localhost:19001 which is not running. Just follow following steps and it should work as expected:
Run expo start no terminal and once it opens up the
browser where you will find this line written Starting Metro
Bundler on port 19001.
Now open another terminal instance and run expo build:android.

"could not connect to development server" error running React Native tutorial with Expo, suspecting Watchman

New to react native and mobile dev, running into this problem:
I am running the React Native hello world from the Facebook Website using Expo CLI as the build tool. What I did was to install Expo, run expo init test, install cocoapods, and cd into the test directory and run expo start.
When I open the app on iOS simulator or my iPhone, I get "Could not connect to development server" after about 3-5 minutes in white screen (see screenshot).
In the Expo logs. It is notable that upon every startup I get the following error logs:
2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory
ERROR
21:49
Watchman: watchman --no-pretty get-sockname returned with exit code=null, signal=SIGABRT, stderr= 2019-08-25T21:49:21,474: [cli] Failed to open /Users/nsadeh/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Not a directory
I have already tried un- and reinstalling Watchman as well as Expo. Not sure what else to do.
To reproduce:
macOS Mojave 10.14.6
node v10.16.3
expo 3.0.10
Watchman 4.9.0
react-native 0.59.10
Run expo init and from the top directory expo start.
Solution: turns out that postgreSQL left an unrelated LaunchAgents.plist file in my Library that was confusing Watchman. Renaming it resolved the issue.

wrapItem(...).trimStart in Expo and React native

Today I create a new project with create-react-native-app and after installing dependencies CRNA says to start your project with expo start, after running this command all thing seems good and a chrome open page localhost:19002 but after a minute this page is stoped and in the console it says :
[12:26:47] Starting project at D:\Try\eleventh
[12:27:13] Warning: Problem validating app.json: Unable to perform cache
refresh for C:\Users\Mohammad\AppData\Local\Expo\schema-30.0.0.json:
Error: connect ETIMEDOUT 35.202.142.166:443.
[12:27:39] Starting Metro Bundler on port 19001.
[12:27:39] Metro Bundler ready.
[12:27:40] Opening on Android device
[12:27:40] Successfully ran `adb reverse`. Localhost URLs should work on
the connected Android device.
[12:27:44] Tunnel ready.
[12:27:44] Expo DevTools is running at http://localhost:19002
[12:27:44] Opening DevTools in the browser... (press shift-d to disable)
exp://192.168.89.2:19000
To run the app with live reloading, choose one of:
[12:27:44] wrapItem(...).trimStart is not a function
[12:27:44] Set EXPO_DEBUG=true in your env to view the stack trace.
as you see it says :
wrapItem(...).trimStart is not a function
and this is some information may be useful :
create-react-native-app version: 2.0.2
node version: v8.11.3
expo version: 2.2.0
npm version: 6.4.0
yarn version:1.10.1
Try using a later version of node. I ran into this issue as well using node version 8. Bumping it with nvm to node 12 worked.