question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ios][eas][expo-branch][managed-workflow] Branch params is always empty when using eas build

See original GitHub issue

Summary

I have migrated my app to 41 SDK, and the new eas build pipeline. When the app is built with the new eas build pipeline (managed workflow), branch does not call the callback with params. So, the deep linking feature is broken.

With eas build

{"error":null,"params":{"+is_first_session":true,"+clicked_branch_link":false,"+rn_cached_initial_event":true},"uri":null}

With expo build

{"error":null,"params":{"~marketing":true,"+is_first_session":false,"debug":"true","$marketing_title":"Debug","~creation_source":1,"~id":920259617150271500,"+clicked_branch_link":true}

This is same code running with SDK 41.

Let me know if you need more info guys

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

41

Environment

Expo CLI 4.4.3 environment info: System: OS: macOS 11.3 Shell: 5.8 - /bin/zsh Binaries: Node: 14.8.0 - ~/.nvm/versions/node/v14.8.0/bin/node Yarn: 1.21.1 - ~/.yarn/bin/yarn npm: 6.14.7 - ~/.nvm/versions/node/v14.8.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: @expo/webpack-config: ~0.12.63 => 0.12.68 expo: ^41.0.0 => 41.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 npmGlobalPackages: expo-cli: 4.4.3 Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

import Branch from "expo-branch";
import Constants from "expo-constants";
import * as React from "react";
import { StyleSheet, Text, View } from "react-native";

export default function App() {
    const [params, setParams] = React.useState(null);

    React.useEffect(() => {
        Branch.subscribe(bundle => {
            setParams(bundle);
        });
    }, []);

    return (
        <View style={styles.container}>
            <Text style={styles.paragraph}>{params}</Text>
        </View>
    );
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: "center",
        paddingTop: Constants.statusBarHeight,
        backgroundColor: "#ecf0f1",
        padding: 8,
    },
    paragraph: {
        margin: 24,
        fontSize: 18,
        fontWeight: "bold",
        textAlign: "center",
    },
});


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
brentvatnecommented, Jun 29, 2021

expo-branch isn’t compatible with EAS Build. the long term solution here is likely that we will be deprecating expo-branch and recommending that users who want to use branch should use the official react-native-branch library with a config plugin. if someone wants to have a shot at writing a config plugin for this, please do!

2reactions
giautmcommented, May 21, 2021

Hey @brentvatne, Do you have any information about this issue? I have to switch back to expo build because this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring EAS Build with eas.json - Expo Documentation
A build profile is a named grouping of configuration that describes the necessary parameters to perform a certain type of build.
Read more >
Branch - Expo Documentation
This module only works in standalone apps on the classic build service ( expo build ). For EAS Build, you should use the...
Read more >
Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. This document is under active development; the topic it covers is...
Read more >
Migrating from "expo build" - Expo Documentation
A reference for migrating from "expo build" to EAS Build.
Read more >
Environment variables and secrets - Expo Documentation
Learn how to use environment variables and secrets in an EAS Build. The Environment variables in Expo guide presents several options for how...
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