Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error opening a device or linter warnings #1

Open
kmpm opened this issue Sep 1, 2021 · 3 comments · May be fixed by #2
Open

error opening a device or linter warnings #1

kmpm opened this issue Sep 1, 2021 · 3 comments · May be fixed by #2

Comments

@kmpm
Copy link

kmpm commented Sep 1, 2021

When running this application (with my own credentials) I always end up with status error opening a device
and it seems as there is some issues with closing capture twice that might affect things.

I can still scan, but this is not what I expect.

onCaptureEvent ListenerStarted from 37714938:  {id: 9, type: 0}
App.js:17 SingleEntryRN: nothing on default id: 9 ListenerStarted 
App.js:17 SingleEntryRN: onCaptureEvent DeviceArrival from 37714938:  {id: 1, type: 6, value: {…}}
App.js:17 SingleEntryRN: opening a device returns:  0
App.js:17 SingleEntryRN: close Capture 
App.js:17 SingleEntryRN: close Capture 
App.js:17 SingleEntryRN: onCaptureEvent DeviceOwnership from 830963504:  {id: 10, type: 4, value: "4ad282a1-0d65-4e19-8d61-1df619f8bb97"}
App.js:17 SingleEntryRN: nothing on default id: 10 DeviceOwnership 
App.js:17 SingleEntryRN: Success in closing Capture:  0
App.js:17 SingleEntryRN: failed to close Capture: TypeError: Cannot read property 'close' of null 
App.js:17 SingleEntryRN: onCaptureEvent ListenerStarted from -1630590934:  {id: 9, type: 0}
App.js:17 SingleEntryRN: nothing on default id: 9 ListenerStarted 
App.js:17 SingleEntryRN: onCaptureEvent DeviceArrival from -1630590934:  {id: 1, type: 6, value: {…}}
index.js:1 SingleEntryRN: error ESKT_NOTINITIALIZED opening a device {error: -19}
console.<computed> @ index.js:1
error @ App.js:25
(anonymous) @ App.js:92
Promise.catch (async)
(anonymous) @ App.js:89
notification @ capture.ts:154
(anonymous) @ capture.ts:45
websocket.onmessage @ httpTransport.ts:151
App.js:17 SingleEntryRN: onCaptureEvent ListenerStarted from -1706342435:  {id: 9, type: 0}
App.js:17 SingleEntryRN: nothing on default id: 9 ListenerStarted 
App.js:17 SingleEntryRN: onCaptureEvent DeviceArrival from -1706342435:  {id: 1, type: 6, value: {…}}
index.js:1 SingleEntryRN: error ESKT_NOTINITIALIZED opening a device {error: -19}

Seems as if useEffect is running multiple times (which it should when content on the page changes) but that messes up things really bad.

@kmpm
Copy link
Author

kmpm commented Sep 1, 2021

This might be my own fault since I added dependencies to useEffect and onCaptureEvent but without them the linter complains about missing dependencies.

src\App.js
  React Hook useCallback has missing dependencies: 'decodedDataList', 'deviceMap', and 'devices'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
  React Hook useEffect has missing dependencies: 'closeCapture' and 'onCaptureEvent'. Either include them or remove the dependency array              react-hooks/exhaustive-deps

I will rename the issue accordingly.

@kmpm kmpm changed the title error opening a device error opening a device or linter warnings Sep 1, 2021
@EricGlaenzer
Copy link
Contributor

Hi @kmpm, I wonder on which platform you're running this? Do you have the Socket Mobile Companion running? (requirement for running this app on Windows or Android) or do you have Socket Mobile Rumba App? (requirement for iOS device)

@kmpm
Copy link
Author

kmpm commented Sep 2, 2021

I have a Androd 10 tablet running the Companion and the webpage in Chrome.
Developing on Windows 10 x64 connected to the tablet via ADB and using the remote inspect feature of Chrome on Windows to see the console and stuff from Chrome on Android.
This isn't a big issue since I could just ignore the linting warnings or disable them, but I can't have both linting without warnings AND a application that doesn't "behave".

@kmpm kmpm linked a pull request Sep 3, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants