Skip to content

SourceMaps not uploaded when using EAS Build #253

@yolpsoftware

Description

@yolpsoftware

Summary

In my project, the source map upload to Sentry worked flawlessly as long as I was using Expo Build. Since having switched to EAS Build, it does no longer work. Sentry reports that the source maps are missing.

With Expo Build, the source map upload was done using a postPublish task in the hooks part of app.json, as documented here. If I understand it correctly, postPublish is not supported by EAS Build, so you need to use the sentry-expo plugin. This seems to be missing in the docs: it is not clearly stated that the postPublish hook is only for Expo Build and not for EAS Build. The docs make it look like you need both the hook and the plugin.

So in my project there are both the postPublish hook and the plugin:

{
  "expo": {
    ...
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "myorg",
            "project": "myproject",
            "authToken": "..."
          }
        }
      ]
    },
    "plugins": [
      "sentry-expo"
    ]
  }
}

However, it still does not work.

Where can I start to find the cause of the problem? The eas build output does not mention anything related to Sentry or source maps, so I'm not even sure if the sentry-expo plugin is working correctly.

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)

44

Environment

expo-env-info 1.0.3 environment info:
System:
OS: macOS 12.3.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.8.0 - /opt/homebrew/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.5.5 - /opt/homebrew/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
npmPackages:
expo: ^44.0.0 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
npmGlobalPackages:
eas-cli: 0.52.0
expo-cli: 5.3.1
Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

I will create a repro, but first I need to know how I can debug this - the docs do not seem to be very clear (see examples above). As soon as someone confirms that my general setup is correct, I will try to isolate the problem into a minimal repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions