expo / sentry-expo

MIT License
202 stars 83 forks source link

Expo iOS build fails when adding Senry-Expo #373

Closed DarrinRobertson closed 7 months ago

DarrinRobertson commented 10 months ago

Summary

After adding expo-entry, following the docs, the build gets near teh end but fails with the below error. Removing the install and teh build works again. No issues on the Android build. Tried using the upgrade versions of Expo-Sentry and its dependencies but that also produced the same error. "sentry-expo": "~7.0.1", "expo-application": "~5.5.0", "@sentry/react-native": "5.10.0" Looking at the issue online and I think it is a Mac\Apple build machine issue but I have no experience there.

[stderr] xcodebuild[5502:18518] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)

Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...

[stderr] xcodebuild[5502:18573] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition

[stderr] xcodebuild[5519:18595] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)

[stderr] xcodebuild[5519:18639] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition,

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

bare

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

49.0.11

Environment

System: OS: Windows 10 10.0.22621 Binaries: Node: 16.20.2 - C:\Program Files\nodejs\node.EXE npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: AI-223.8836.35.2231.10671973 npmPackages: expo: ^49.0.11 => 49.0.11 react: 18.2.0 => 18.2.0 react-native: 0.72.5 => 0.72.5 Expo Workflow: bare

Reproducible demo or steps to reproduce from a blank project

Expo Build issue with this package. Add Sentry-Expo Send to Expo to build a ios via EAS

krystofwoldrich commented 10 months ago

Hi, thank you for the message, does the error happen only in EAS or can you reproduce it locally?

alexvancap commented 10 months ago

I have the same problem, it happens in EAS. I am able to build locally.

DarrinRobertson commented 9 months ago

I am on a windows machine, so use EAS to do my ios builds.

frankcalise commented 9 months ago

I see it on EAS like the original post.

When I build locally, I get this in my xcodebuild.log

xcodebuild.log

Error: spawn /Users/fcalise/code/ignite-kristielengel/node_modules/@sentry/cli/sentry-cli ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /Users/fcalise/code/ignite-kristielengel/node_modules/@sentry/cli/sentry-cli',
  path: '/Users/fcalise/code/ignite-kristielengel/node_modules/@sentry/cli/sentry-cli',
  spawnargs: [
    'debug-files',
    'upload',
    '--force-foreground',
    '',
    '/Users/fcalise/Library/Developer/Xcode/DerivedData/Balance-chdpecniwljgymaqozcjivpuemqa/Build/Products/Release-iphonesimulator'
  ]
}

So seems Sentry related, CNG dev client workflow

package.json

    "@sentry/react-native": "5.5.0",
    "sentry-expo": "~7.0.0"

app.config.ts

    hooks: {
      postPublish: [
        {
          file: "sentry-expo/upload-sourcemaps",
          config: {
            organization: "XYZ",
            project: "ABC",
          },
        },
      ],
    },

EDIT:

I pulled these packages out of the project temporarily and confirmed that both my local and EAS builds succeeded afterwards.

lukasguldstoev commented 9 months ago

I have the same issue. Any update?

FloppiTuna commented 9 months ago

it seems that sentry-cli resides at /node_modules/@sentry/cli/bin/sentry-cli now, but sentry-expo hasn't yet reflected this change it seems?

frankcalise commented 9 months ago

@IntelligentPickle yeah that looks correct, it's fixed in version 7, so I guess it will be proper in Expo SDK 50. Is that correct, @kbrandwijk? Maybe it could be picked back for 6.x?

https://github.com/expo/sentry-expo/commit/11491cb8e889970d574c55ba655a69955c57500b

You could probably patch-package it for now.

krystofwoldrich commented 9 months ago

@frankcalise The path to the @sentry/cli bin is the same in v6 and v7. It's possible that the binary doesn't exist because the post-install script didn't download it.

You can try to execute it manually -> https://github.com/getsentry/sentry-cli/blob/master/scripts/install.js

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.