#demodian_error
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1390388930506920178
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I've also removed and reinstalled @stripe/stripe-terminal-react-native module to get the latest version with no luck
I need to emphasize that I need to use web testing to do this. I have not started to use a device yet for testing, as I want to get the flow of our app done before worrying about emulators or devices
Hi! Can you share the code that's throwing this error?
import { Reader, requestNeededAndroidPermissions, StripeTerminalProvider, useStripeTerminal } from '@stripe/stripe-terminal-react-native';
just having this line in my app, it gives
Cannot read properties of undefined (reading 'getConstants')
when web testing with expo/Metro
I have NOT started device testing, but considering that terminal sdk should support internet devices, there should be a way for web development to work.............. (i mean we do it already for our website now to access our current readers)
and we should be able to simulate devices from the example app I've riffled through already
Can you please provide me with the versions of everything you're using, and that you've gone through and ensured you meet all the requirements here? https://github.com/stripe/stripe-terminal-react-native?tab=readme-ov-file#requirements
how best should I try to verify javascript/typescript version?
this?
"node_modules/@babel/plugin-syntax-typescript": {
"version": "7.25.9",
Can you share the stack trace for the error?
right now, i am not using Android or iOS. I'm trying to test web at the moment
this is all i get:
Call Stack
factory (app/index.tsx:5)
Web Bundled 118ms node_modules/expo-router/_error.js (283 modules)
if I remove the import line, I do not get the error. The simple act of adding the import makes it break
Neither of those are Stripe files.
What is the whole, complete error from the console, including all lines?
Log 1 of 1
Server Error
Cannot read properties of undefined (reading 'getConstants')
Source
3 |
import
{
DarkTheme
,
NavigationContainer
,
ThemeProvider
}
from
'@react-navigation/native'
;
4 |
import
{ useRouter }
from
'expo-router'
;
5 |
import
{
Reader
,
requestNeededAndroidPermissions
,
StripeTerminalProvider
,
useStripeTerminal }
from
'@stripe/stripe-terminal-react-native'
;
|
^
6 |
7 |
import
{
AuthContext
}
from
'@/contexts/AuthContext'
;
8 |
import
{
AuthStackNavigator
}
from
'@/navigators/AuthStackNavigator'
;
Call Stack
factory
app/index.tsx:5
Showing all frames
This error cannot be dismissed.
Ok cool. I don't recognize that format, but the call stack doesn't seem to include anything Stripe related at all.
that may be the case, but I cannot use this on web testing under expo/metro. I don't have a device to test with or emulate. I'm trying to do this so I can get the flow done in a browser and worry about device testing at the end, and it is so frustrating that there's no easy way to do this without some device attached. I'm not at that stage yet
so any ideas?
One sec.
without the import line, i get this:
with the import line, i get this:
without the console active
Ahh, ok. Can you try four separate import lines like this?
import { Reader } from '@stripe/stripe-terminal-react-native';
import { requestNeededAndroidPermissions } from '@stripe/stripe-terminal-react-native';
import { StripeTerminalProvider } from '@stripe/stripe-terminal-react-native';
import { useStripeTerminal } from '@stripe/stripe-terminal-react-native';
...and then see which line it's popping on?
Hi there! Taking over for timebox - just getting up to speed
looks like it could be NativeModules not liking web testing, which doesn't make sense.
considering that the terminal SDK supports simulated readers and Internet-capable devices, it should not restrict web-based apps.
we use the terminal SDK on our current web-based system to interface with the BBPOS WisePOS E
we just wanted to be able to support the M2 with the new app
can you run cd ios && pod install?
This is a common issue with React Native SDK installation where sometimes pods required to run the app on iOS fail on the first try, but explicitly running the command afterwards reinstalls required packages
not dealing with iOS yet. we were going to deal with Android first because i don't have a Mac yet
but i'm not testing with Android yet
just trying to use web testing without an emulator or device (frankly don't want to deal with compiles yet), so it's just Metro as a web server
and right now, i'm on Ubuntu desktop 24.04, so I don't have access to Apple tools
ah!
Terminal React Native SDK won't work on a web browser as it requires mobile specific APIs/features. You would need to test on an emulator
and that will slow down my development time. seriously, does no one take into account that simulation is a thing and your sdk already supports internet-capable devices (we are already doing that now with our legacy app).
this is the reason i dislike the whole react native ecosystem
the rapid development for the UI was okay with web testing, but trying to do something serious now has to delay progress.
well, emulation does not work either.......
i get the same error
if i comment out the line, i get my screen as i'd expect
talking to a colleague with more expertise on React Native/terminal about this
ok
Hello
Jumping in to help out
I wonder if it's something specific to your project config. Could you try the solution proposed in this comment? https://github.com/stripe/stripe-terminal-react-native/issues/950#issuecomment-2914851670
where would i put the implementation lines? no context in the post
It says the file name right before the snippets?
build.gradle
should be undle android/ folder
there's more than one.... ugh, looks like it's app/build.gradle
Hmm, are you seeing any errors/logs?
Try running adb logcat to see if the app just crashed or is still running?
i have to break for about 45 minutes or so. need to head home from dialysis. any way to keep the ticket from getting closed?