Manifest string is not a valid json object or string

Found this on another forum btw:

Here's a few steps I recommend:

1. Make sure wireless debugging is turned on. My OnePlus phone often turns off wireless debugging when I switch networks.
2. Switch to tunnel, there are often funny issues on Public Networks.
3. Go to settings on your phone and find expo's settings. Turn the setting "Display over other apps", to off then on again (it should definitely be on).
4. Uninstall Expo Dev clients AND builds, this is often the cause for me.
5. Try a wired connection (make sure USB debugging is on).
6. Reinstall Expo Go on your phone

This can be a real pain, good luck to all.

OK, good. Although are you sure the link you posted here to corresponds with the --profile preview build?
Unless you changed the “preview” profile in eas.json it should have generated an APK rather than an AAB.

OK, here’s the problem :slight_smile:

A “Preview” APK (or a production AAB) is a standalone app that you just install and open on your phone directly. It is not something you can use with Expo Go.

Even a “development” APK is not something you can use with Expo Go. It is an alternative to Expo Go.

If you are only using dependencies from the Expo SDK with the possible addition of extra pure JavaScript dependencies, then you can use Expo Go. This does not involve eas build. You just run expo start in your project and then connect to the displayed link from Expo Go (or scan the QR code). (In Expo SDK 46 or later you would use npx expo start.)

If you want to use a dependency that includes native code that is not part of the Expo SDK, then you will need to build a dev client. This would previously have required you to “eject”, but these days many dependencies will work out of the box when built with EAS Build instead of the classic “expo build”. Others can still be made to work by installing or writing a “config plugin”.

A dev client (build with eas build -p android --profile development) is basically a customised version of Expo Go that includes all of your dependencies. Expo Go only contains the native code needed by the Expo SDK, but the dev client would include any native code from your dependencies too. So when you try to call those native dependencies from JavaScript, it would fail in Expo Go, but work in the dev client.

I see you’re using react-native-sound, which includes its own native code. Fortunately it only mentions react-native link in the installation docs, and this should be taken care of automatically by React Native’s “autolinking” during the EAS Build build process.

So, use eas build -p android --profile development.

At the start of the build process it will print out the following:

% eas build -p android --profile development
✔ Using remote Android credentials (Expo server)
✔ Using Keystore from configuration: Build Credentials xxxABC123z (default)

Compressing project files and uploading to EAS Build. Learn more
✔ Uploaded to EAS 10s

Build details:[account]/projects/[project]/builds/ff7469b1-bb39-49c7-83d6-27c039167c17

You can see the build progress at the Build details URL. When it’s done, you will also be able to download the APK onto your phone from that page.

At the end of the build it will print a QR code in the terminal and the “Build details” URL again:

🤖 Open this link on your Android devices (or scan the QR code) to install the app:[account]/projects/[project]/builds/ff7469b1-bb39-49c7-83d6-27c039167c17

The above-mentioned QR code is just a convenient way to get to the build page from your phone without having to type in the whole URL. This is not a QR code that would work in Expo Go.

If you browse to the URL with your phone you’ll see an “Install” button. This should download the APK, after which you should be able to install it.

After installing it, open it on your phone and run expo start in your terminal. Another QR code should be displayed in the terminal and below that something like:

› Choose an app to open your project at
› Metro waiting on exp://

If you open the QR code on your phone (or the …/_expo/loading URL) then it will allow you to choose to open Expo Go or the Development Build. You’d choose Development Build.

Alternatively you can choose the option to enter the URL manually into the development client.

After that you can use the dev client as you would use Expo Go.

1 Like

Seems good now, thanks alot. I can run it from the client now.

1 Like

One of the key points here is that there are specific circumstances when you need a dev client build. In general stick to using Expo Go only, until it no longer works for you.

If you need a dev client build purely for debugging purposes I would recommend using an application monitoring library such as sentry instead. It is more scalelable and better suited to that task.

I agree. Stick with Expo Go for development if you can.

But @markcash11’s app has react-native-sound as a dependency. I assume it’s actually being used :sweat_smile:

If it’s being used, then Expo Go won’t work for that app.

Good spot.I missed that :+1:

Problem fixed, apk generated with eas build now works as intended, thanks for pointing this out

1 Like