html title undefined in expo after upgrading from SDK36 to SDK38

Please provide the following:

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all): web

I have my html title undefined in expo after upgrading from SDK36 to SDK38.

In my web-build/index.html, I can see that:

<title>%WEB_TITLE%</title>

However, this get replaced first by the app name and then itinstantly get set to undefined:

<title>undefined</title>

I do not use react-helmet yet, what in expo SDK38 is changing my page title?

1 Like

this comes from app.json web.name property - expo-cli/ExpoInterpolateHtmlPlugin.ts at e958ff848c3c73cfa9f9e043847450b8723bb5f1 · expo/expo-cli · GitHub

see: app.json / app.config.js - Expo Documentation

also, please stop posting questions to multiple platforms simultaneously (forums, stackoverflow). when you do this we need to answer in every place to ensure that if someone else has a similar question they can find the correct answer. we can see this due to slack integrations:

Ok, I won’t do that again.

I have added in my app.json:

{
  "expo": {
    "web": {
      "name": "Ici Matin - Les bonnes affaires du jour!",
      "shortName": "Ici Matin",
      "backgroundColor": "#f00",
      "lang": "fr"
    },
  }
}

This didn’t help I still have undefined in my title.

Upgrading expo-cli to latest didn’t help

do you have a custom webpack config? if you do and somehow the ExpoInterpolateHtmlPlugin is left out then it would lead to this behavior

I cannot repro with the provided information. Please share a minimal reproducible example of the issue.

1 Like

same as @bacon on my end. i created a new sdk 38 project, ran expo customize:web to generate the webpack config, then edited web.name in app.json and it worked as expected

it makes sense that you can’t share it but you can follow the instructions on How to create a Minimal, Reproducible Example - Help Center - Stack Overflow to try to re-create a minimal reproducible example! :slight_smile:

here’s a key highlight from that article:

Minimal

The more code there is to go through, the less likely people can find your problem. Streamline your example in one of two ways:

  1. Restart from scratch. Create a new program, adding in only what is needed to see the problem. Use simple, descriptive names for functions and variables – don’t copy the names you’re using in your existing code.
  2. Divide and conquer. If you’re not sure what the source of the problem is, start removing code a bit at a time until the problem disappears – then add the last part back.

It appear that the error comes from NavigationContainer.

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