#jack-drake_api
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/1429862783792578670
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello ๐
Can you share the reader serial number?
STRM26146052411
Is your integration checking for available updates when you connect to the reader?
https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=react-native&reader-type=usb#update-reader
yes
heres the code we are using
// Subscribe to Stripe Terminal events
console.log('[StripeReader] Adding listener for: didStartInstallingUpdate');
const startListener = DeviceEventEmitter.addListener('didStartInstallingUpdate', handleUpdateStart);
console.log('[StripeReader] Adding listener for: didReportReaderSoftwareUpdateProgress');
const progressListener = DeviceEventEmitter.addListener('didReportReaderSoftwareUpdateProgress', handleUpdateProgress);
console.log('[StripeReader] Adding listener for: didFinishInstallingUpdate');
const finishListener = DeviceEventEmitter.addListener('didFinishInstallingUpdate', handleUpdateFinish);
// When an optional update is reported, auto-install it to ensure latest firmware
console.log('[StripeReader] Adding listener for: didReportAvailableUpdate');
const availableUpdateListener = DeviceEventEmitter.addListener('didReportAvailableUpdate', async (update: any) => {
try {
console.log('[StripeReader] ========== AVAILABLE UPDATE REPORTED ==========');
console.log('[StripeReader] Update details:', JSON.stringify(update, null, 2));
if (updateRequestedRef.current || isUpdating) {
console.log('[StripeReader] Update already requested or in progress; skipping auto-install');
return;
}
updateRequestedRef.current = true;
const res = await installAvailableUpdate();
if ((res as any)?.error) {
console.log('[StripeReader] Auto-install update returned error:', (res as any).error);
updateRequestedRef.current = false;
} else {
console.log('[StripeReader] Auto-install update initiated');
}
} catch (e) {
console.log('[StripeReader] Auto-install update threw error:', e);
updateRequestedRef.current = false;
}
});
the problem is that this didReportAvailableUpdate gets skipped over and its even called
the log output are below
hope this information helps
It seems like this update may not be optional. Since our docs imply we don't trigger onDidReportAvailableUpdate for mandatory updates.
i understand that part but once the update is initiated it does the following error
Error: ENOENT: no such file or directory, open 'C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\InternalBytecode.js'
at Object.readFileSync (node:fs:441:20)
at getCodeFrame (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:997:18)
at Server._symbolicate (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:1079:22)
at Server._processRequest (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:460:7) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\xampp\\htdocs\\GitHub\\OrdernGo\\orderngo-kiosk\\InternalBytecode.js'
}
Error: ENOENT: no such file or directory, open 'C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\InternalBytecode.js'
at Object.readFileSync (node:fs:441:20)
at getCodeFrame (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:997:18)
at Server._symbolicate (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:1079:22)
at Server._processRequest (C:\xampp\htdocs\GitHub\OrdernGo\orderngo-kiosk\node_modules\metro\src\Server.js:460:7) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\xampp\\htdocs\\GitHub\\OrdernGo\\orderngo-kiosk\\InternalBytecode.js'
}
LOG [StripeReader] Connection status changed: notConnected
LOG [StripeReader] Connect result: {"errorCode": "UNEXPECTED_ERROR.UNEXPECTED_SDK_ERROR", "errorDetails": {"code": "UNEXPECTED_ERROR.UNEXPECTED_SDK_ERROR", "message": "Unexpected failure"}, "errorMessage": "Unexpected failure", "hasError": true}
LOG [StripeReader] ========== CONNECTION ATTEMPT ENDED ==========
ERROR [StripeReader] Connection failed with error: {"code": "UNEXPECTED_ERROR.UNEXPECTED_SDK_ERROR", "message": "Unexpected failure"}
Okay. But I'm looking at the file paths in the error stack and I don't see Stripe's SDK involved here, except that the Error: ENOENT: no such file or directory causes the application to crash
Okay it took a while but I was able to pull up some logs from this reader too.
I'm seeing some weird errors that I've not seen before
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/datetime/Clock$System;
Hmmm....
In your React Native integration, are you excluding the org.jetbrains.kotlinx dependency group?
where would i check that. I do not believe we are
This would be an issue specific to Android implementations so it would likely be in a gradle file
we have another application that tested on and it worked but its using the java sdk
Sorry but that doesn't provide any additional insight
From what I can gather, to be fair it's a lot of reading between the lines, the issue is with a core utility function not being found
hmm you think it could be a permissions type of error?
The only previous examples of this error being thrown occurred when users wound up excluding some core dependencies from their application builds
hmm you think it could be a permissions type of error?
I don't think I have said anything, or seen anything to imply this is permissions based
alright let me checkout the dependencies. Ill get back to you if you could please keep this thread open please
We leave threads open for a while (30m - 1 h) but close them due to inactivity. But this thread will continue to be available as a reference even after it's closed and you can always open a new thread.
alright thanks again. We are looking into the issue right now