Linking requires a build-time setting `scheme` in the project's Expo config

See original GitHub issue

🐛 Bug Report

Summary of Issue

I’m using expo-linking v2.1.1 and trying to call createURL. However, I’m getting the following error when I try to run a simple test that just renders the app (code is in the Steps to Reproduce):

Linking requires a build-time setting 'scheme' in the project's Expo config (app.config.js or app.json) for bare or production apps.

My scheme is already defined in app.json.

The only way I can suppress this error is by passing my scheme again when I call createURL. When I do this and I eject, though, I get another error:

The provided linking scheme does not appear in the list of possible uri schemes in your expo config

Even though the scheme that it prints out is encapsulated within the list of schemes it says it should match.

So I think for some reason it’s just not recognizing the scheme that’s defined in the app.json.

Environment - output of expo diagnostics & the platform(s) you’re targeting

Expo CLI 4.1.0 environment info:
    System:
      OS: Linux 4.4 Ubuntu 18.04.2 LTS (Bionic Beaver)
      Shell: 4.4.20 - /bin/bash
    Binaries:
      Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
      Yarn: 1.22.5 - /mnt/c/Program Files (x86)/Yarn/bin/yarn
      npm: 6.14.10 - ~/.nvm/versions/node/v14.15.0/bin/npm
    npmPackages:
      expo: ^40.0.1 => 40.0.1
      react: ^17.0.1 => 17.0.1
      react-dom: ^17.0.1 => 17.0.1
      react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
      react-native-web: ^0.14.8 => 0.14.10
    npmGlobalPackages:
      expo-cli: 4.1.0
    Expo Workflow: managed

Reproducible example

https://github.com/churichard/expo-linking-bug

Steps to Reproduce

Clone the repo, run yarn install, then run yarn test. The warning should show up when the App.test.tsx test is run.

Expected Behavior vs Actual Behavior

This warning should not appear if scheme is already defined in app.json.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jeremywhittingtoncommented, Sep 8, 2021

@brentvatne @byCedric I dont know for sure that im getting the error for the same reason but I do see this warning on a brand new project. Is there something I should do to fix it?

2reactions
brentvatnecommented, Jan 27, 2021

published jest-expo@40.0.2 with @byCedric’s fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linking requires a build-time setting `scheme` in the project's ...
Linking requires a build-time setting scheme in the project's Expo config (app.config.js or app.json) for production apps, ...
Read more >
Linking - Expo Documentation
Learn how to use Linking to handle a URL based on the URL scheme. ... canOpenURL requires additional configuration to query other apps'...
Read more >
#2 Deep Linking With React Navigation | Expo ... - YouTube
Learn how to take a user to a specific screen from a deep link using react-navigation and the expo - linking module.We'll first...
Read more >
Home - Documentation
Configure the SDK. You need make your Android, iOS or Expo applications aware that an authentication result will be received from the browser....
Read more >
Prepare your Expo build by configuring app.json file - Boostrand
For further configuration or if you need more information on app.json folder, ... Slug will be used as a link on Expo so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found