We are trying to integrate our Expo app with Bugsnag (which provides Sentry-like crash/error processing). All seems well except for being to apply source maps properly in order to provide usable stack traces. For whatever reasons Bugsnag requires that the file names associated with minified files have an extensions of ‘.js,’ ‘.bundle’ or ‘.jsbundle’.
For versions of my app built for IOS, all seems fine and I see file names like:
main.jsbundle
or sometimes:
https://RANDOM_DIGITS.cloudfront.net/%40thunkable%2FthunkableCompanion%2F1.0.0%2Fdb7c9f94edab7060d350dfaf09513a38-29.0.0-ios.js
but for Android I see:
/data/user/0/foo.bar/files/29.0.0/cached-bundle-experience-%40foo%2Fbar781564956-29.0.0
which, you can see does not end in a file extension of ‘.js,’ ‘.bundle’ or ‘.jsbundle’.
I don’t really understand what is going on here, but is there anyway that I can cause the minified file to have an appropriate extension?
In case it matters, the project has been ejected to ExpoKit.
Thanks in advance.
-Mark
P.S. I see a mention of a more “normal” bundle URL in the generated AppConstant.java file for our app but for some reason it isn’t getting communicated in the same way as it is for iOS.
Here are the contents of the generated AppConstant.java file, in case that helps. Some of the contents have been lightly obscured with asterisks:
package host.exp.exponent.generated;
import com.facebook.common.internal.DoNotStrip;
import java.util.ArrayList;
import java.util.List;
import host.exp.exponent.BuildConfig;
import host.exp.exponent.Constants;
@DoNotStrip
public class AppConstants {
public static final String VERSION_NAME = "2.6.2";
public static String INITIAL_URL = "exp://exp.host/@thunkable/************";
public static final boolean IS_DETACHED = true;
public static final String SHELL_APP_SCHEME = "exp***************";
public static final String RELEASE_CHANNEL = BuildConfig.RELEASE_CHANNEL + '-' + BuildConfig.VERSION_CODE;
public static boolean SHOW_LOADING_VIEW_IN_SHELL_APP = false;
public static boolean ARE_REMOTE_UPDATES_ENABLED = true;
public static final List<Constants.EmbeddedResponse> EMBEDDED_RESPONSES;
public static boolean FCM_ENABLED = false;
static {
List<Constants.EmbeddedResponse> embeddedResponses = new ArrayList<>();
// ADD EMBEDDED RESPONSES HERE
// START EMBEDDED RESPONSES
embeddedResponses.add(new Constants.EmbeddedResponse("https://exp.host/@thunkable/************/index.exp", "assets://shell-app-manifest.json", "application/json"));
embeddedResponses.add(new Constants.EmbeddedResponse("https://***********.cloudfront.net/%40thunkable%2F***************%2F1.0.0%2F*****************-29.0.0-android.js", "assets://shell-app.bundle", "application/javascript"));
// END EMBEDDED RESPONSES
EMBEDDED_RESPONSES = embeddedResponses;
}
// Called from expoview/Constants
public static Constants.ExpoViewAppConstants get() {
Constants.ExpoViewAppConstants constants = new Constants.ExpoViewAppConstants();
constants.VERSION_NAME = VERSION_NAME;
constants.INITIAL_URL = INITIAL_URL;
constants.IS_DETACHED = IS_DETACHED;
constants.SHELL_APP_SCHEME = SHELL_APP_SCHEME;
constants.RELEASE_CHANNEL = RELEASE_CHANNEL;
constants.SHOW_LOADING_VIEW_IN_SHELL_APP = SHOW_LOADING_VIEW_IN_SHELL_APP;
constants.ARE_REMOTE_UPDATES_ENABLED = ARE_REMOTE_UPDATES_ENABLED;
constants.EMBEDDED_RESPONSES = EMBEDDED_RESPONSES;
constants.ANDROID_VERSION_CODE = BuildConfig.VERSION_CODE;
constants.FCM_ENABLED = FCM_ENABLED;
return constants;
}
}