expo / expo/snack

react-native-blob-util `getConstants` error in expo snack android / ios

Open
#385 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
510
Forks
178
Avg merge
5h 7m
Merged PRs (30d)
5

Description

### Summary

Importing `react-native-blob-util` in Expo Snack throws the error

```
null is not an object (evaluating 's.default.getConstants')
```

This error does not show up in a normal project.

### What platform(s) does this occur on?

Android, iOS

### SDK Version

47.0.0

### Reproducible demo or steps to reproduce from a blank project

simplest repro: https://snack.expo.dev/7gchaAZa2 . Steps:

- create a new snack
- add a dependency on `react-native-blob-util` in `package.json`
- import the dependency somewhere in `App.js`

.

For an apples-to-apples comparison, https://docs.sheetjs.com/docs/getting-started/example#run-the-demo-locally select "Mobile App". The macOS + iOS, macOS + Android, and Win10 + Android steps have been tested on multiple machines.

The same code in a snack: https://snack.expo.dev/CzKgQUjCH

Android fails with:

snackdroid

iOS fails with:

snackos

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure from the linked Expo Snack examples, then compare the package.json dependency and App.js import with the local-project comparison described in the issue. Trace why react-native-blob-util is unavailable when Snack evaluates getConstants on Android and iOS; done means the dependency imports without the reported error in both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.