sentry-react-native: Upgrade to Android Studio 4.0 release APK then throw [Cause: path may not be null or empty string. path='']

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 1.3.8

react-native version: 0.62.2

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

  • (@sentry/react-native)
Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
});

or

  • (react-native-sentry)
Sentry.config(
  'https://...@sentry.io/...'
  // other options
 ).install();

I have following issue:

Use Android Studio 4.0 release apk throw error [ Cause: path may not be null or empty string. path=‘’ ], but i delete the [apply from: “…/…/node_modules/@sentry/react-native/sentry.gradle”] it working now and build release APK everything is normal, and try test throw error in RN everything is normal, so why?

Android Studio Version:

Android Studio 4.0
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 8
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: 

Steps to reproduce:

  • Step 1: Android Studio 3.4.1 build release is okay.
  • Step 2: upgrade to Android Studio 4.0 build release throw error[Cause: path may not be null or empty string. path=‘’]
  • Step 3: delete [apply from: “…/…/node_modules/@sentry/react-native/sentry.gradle”] build release is okay.

Actual result:

[throw error: Cause: path may not be null or empty string. path=‘’]

Expected result:

[build release apk is okay.]

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

ok, it works when building outside of AS though. the reason is simple, AS 4.x builds only the necessary build types/flavors/ABIs for the attached device/emulator but the plugin tries to do its job for all the configurations, those files don’t exist yet.

We’ll figure this out, thanks.