Expo dev build for Android internal distribution crashes in emulator

As you can see this is using c3 ad for the accented “i”, so that is valid UTF-8. So it does not look like a problem with your app.config.js.

You should be able to do it like this:

But instead of:

  './plugins/withGradleProperties',

you should be able to install @expo/config-plugins and then do something like this:

app.config.js

import { withGradleProperties } from '@expo/config-plugins';

[...]
  plugins: [
    [withGradleProperties, { FLIPPER_VERSION: "0.144.0" }]
  ]
[...]

Thanks @wodin I’ll try that

Also I think this issue is hit in the build process by the EAS build command. I think there’s something to do by the expo team, don’t you think?

I think that if you can create a new app with a name containing an accented “i” and it also fails in this way, then you should create an issue at Issues · expo/expo · GitHub with the details. Also link to the flipper issue and a Git repository containing this new app and also include the details of the Android emulator settings (Android API version, etc.) where you encountered the error.

1 Like

Thanks @wodin will do for shure…

Hi! done this npx expo install @expo/config-plugins then in

app.config.js

import { withGradleProperties } from '@expo/config-plugins';
...
...
plugins: [
      ...
      ...
      [
        withGradleProperties,
        {
          FLIPPER_VERSION: '0.144.0',
        },
      ],
    ],
...
...

but got this error in expo.dev build at run npx eas build --profile development --platform android:

[stderr] TypeError: [android.gradleProperties]: withAndroidGradlePropertiesBaseMod: action is not a function
[stderr] TypeError: [android.gradleProperties]: withAndroidGradlePropertiesBaseMod: action is not a function
[stderr]     at action (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:29)
[stderr]     at interceptingMod (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:27)
[stderr]     at action (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:240:14)
[stderr]     at async interceptingMod (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
[stderr]     at async action (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/createBaseMod.js:71:21)
[stderr]     at async interceptingMod (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
[stderr]     at async evalModsAsync (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/mod-compiler.js:256:25)
[stderr]     at async Object.compileModsAsync (/home/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/mod-compiler.js:160:10)
[stderr]     at async configureProjectAsync (/home/expo/workingdir/build/node_modules/@expo/cli/build/src/prebuild/configureProjectAsync.js:54:15)
[stderr]     at async prebuildAsync (/home/expo/workingdir/build/node_modules/@expo/cli/build/src/prebuild/prebuildAsync.js:83:9)
npx exited with non-zero code: 1

Filed a bug report because I think it may be something to do with the expo dev client package to use another version of flipper at build time Expo dev build for Android internal distribution crashes in emulator if app name has accented characters · Issue #19274 · expo/expo · GitHub

Finally got it working. It’s indeed an issue with app name with accented characters and some Flipper issue, thanks to @wodin guidance I come to a solution that I share as follows:

First created a new config plugin in /plugins/withCustomGradleProperties.js with this content:

// Don't use ES6 here because somehow plugin parsing is made with some node
// moule magic and not ES6 syntax
const { withGradleProperties } = require('@expo/config-plugins');

module.exports = (config) => {
  const graddleProperties = [
    {
      type: 'property',
      key: 'FLIPPER_VERSION',
      value: '0.144.0',
    },
  ];

  return withGradleProperties(config, (config) => {
    graddleProperties.map((gradleProperty) => config.modResults.push(gradleProperty));

    return config;
  });
};

Then, import plugin in app.config.js like this

...
...
plugins: [
      ...
      ...
      ['./plugins/withCustomGradleProperties'],
    ],
...
...

Here some screenshots of dev build running

Pixel 4 API 29

Pixel 4 API 30

Pixel 4 API 31

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.