React Kiosk app on Google Chrome crashes on multi touch input - javascript

We have a Kiosk App (written in React) and it is working on ~800 devices. All of the devices are Windows devices and for some of them (about 5%), when a user without tech literacy uses more than one finger (lets say he tries to input his customer number but with using three fingers instead of one) the app crashes after a point (Google Chrome is not responding error).
I do not know why, but when I tried to debug the app on live environment using localhost:9222 as my Chrome DevTools output, I could raise some errors while scrolling and clicking the app, but I cannot create the user input remotely, because I am using a mouse, not a touch screen. And I cannot debug on the devices.
Does anybody have an idea on what is wrong? And how can I stop the crashes?
What I tried to do so far;
Tried to enable Crash Logs, couldn't make it log to a file so I can inspect it, nothing gets logged
Tried to create a chrome console log file, but nothing is shown here too
Tried to change screen input type from touch to mouse click, didn't fix it
Tried to use Chrome Command Line Switches such as disable-pinch and enable-crash-reporter but none of them seem to give me any info or fix the problem
Any tips?

Related

UWP Javascript App - how to use the touch-keyboard when multiple monitors

I'm developing a UWP javascript app using an Aures touch screen device with a second monitor, something like this:
https://images-nitrosell-com.akamaized.net/product_images/14/3282/alt2-aures-nino-epos-system.jpg
The second monitor is integral to the app
The issue is this: Windows 10 will not go into 'tablet' mode while two monitors are connected, and if it's not in tablet mode, I have no way of forcing the tablet-based onscreen keyboard to pop up when inside an input field. I found this:
https://answers.microsoft.com/en-us/windows/forum/all/message-tablet-mode-isnt-available-while-your/9d6c7525-658b-4cb9-95ae-ec69f854f218
But that gives no resolution to the problem.
I thought I could change the app manually to be touch-based, force it to use touch, with the following code:
const ViewManagement = Windows.UI.ViewManagement;
const currentView = ViewManagement.UIViewSettings.getForCurrentView();
currentView.userInteractionMode = ViewManagement.UserInteractionMode.touch;
But it turns out currentView.userInteractionMode is a read-only field. That code does nothing.
If I can't get this to work, my only recourse will be to build into the app my own custom keyboard -- that's a last-resort though as far as I'm concerned.
I can't find any resources on how to programatically force the keyboard open either. Really pulling a blank here.
I managed to find an answer
https://www.tenforums.com/tutorials/83312-turn-off-automatically-show-touch-keyboard-windows-10-a.html
These directions are for enabling the onscreen keyboard as if the computer is in tablet mode, when it's not in tablet mode (I think it only has an effect when (a) you've got a touchscreen monitory and (b) you have no keyboard attached).
OPTION ONE didn't work for me because I couldn't find that setting.
OPTION TWO required a restart but works perfectly after that. In case that website goes down, I'll post option two here:
OPTION TWO gives you a file called Turn_ON_show_touch_keyboard_.reg
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: May 1st 2017
; Tutorial: https://www.tenforums.com/tutorials/83312-turn-off-automatically-show-touch-keyboard-windows-10-a.html
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
"EnableDesktopModeAutoInvoke"=dword:00000001
And to disable it: Turn_OFF_show_touch_keyboard_.reg
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: May 1st 2017
; Tutorial: https://www.tenforums.com/tutorials/83312-turn-off-automatically-show-touch-keyboard-windows-10-a.html
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
"EnableDesktopModeAutoInvoke"=dword:00000000
Just create Turn_ON_show_touch_keyboard_.reg on your desktop and double click it, then restart. Might want to restart with keyboard already unattached, not sure if starting the computer with keyboard attached messes anything up.

P5 component stopped updating in mobile browser (but works in pc browser)

I have this app that grabs your webcam's video stream and classifies the objects in the picture. You can see the deployed version here:
ndf-react.firebaseapp.com
The app works okay with a pc web browser (in my case, Chrome), but it encountered a few problems when I'm trying to view in a mobile browser.
Safari on iPhone was able to get the basic UI showing. However, the label (blue text in the video screen) does not update, this is a continuously updated value, which shows the predicted label of the video stream.
The value updates just fine in a pc browser.
I'm definitely unsure of why this would happen. Any help appreciated.
Here's the repo: https://github.com/kyujyokei/ndf-react

Expo bug - After a crash, the Android Back Button causes standalone app to be put into the background

We’re running into an issue where after the app “crashes” and reloads (user gets kicked back to the first screen), whenever the user presses the Android Back Button, the app gets put into the background. I was able to reproduce this with the default “Tabs” project that’s provided by CRNA on Expo 31 SDK (link: https://exp-shell-app-assets.s3.us-west-1.amazonaws.com/android/%40allen.lin/split-screen-poc-c25e728a483c4c71ba9109ac70a93ef1-signed.apk 1) with no additional code added. The current work around is to have the user open up the app switcher and kill and re-open the app.
Here are some steps to consistently reproduce it on a Google Pixel 2 Phone (or any other phone with the split-screen feature), which will cause the app the reload:
Open the app.
Tap on any of the tabs to switch to different screens (i.e. “Links”). Pressing the Android Back Button should put the user back to the “Home” tab.
From here, activate the split-screen feature by long-pressing the Square icon located at the bottom of the device (where the Back and Home buttons are). This will cause the app to crash and reload.
Get out of the split screen view by dragging the black horizontal bar at the center of the screen to the bottom of the screen so that the app is focused again. This will again cause the app to crash and reload.
Tap on the “Link” tab again.
Now press the Android Back Button. The app should be minimized.
I tried looking at ADB Logcat but there was too much noise in the logs. One line did stick out when I grep’d the logs for ‘exception’ though:
12-05 16:03:07.137 23448 23448 E j : Runtime exception in RNObject when calling method getCurrentReactContext: java.lang.NullPointerException: null receiver
I also saw some calls to moveTaskToBack() being made when the back button is pressed.
Just to be clear, this is not linked to the Split-Screen feature on Android devices. One of my colleagues was able to reproduce this on his XiaoMi A1M1 device (running Vanilla Android 8.1.0 – he’s on the Android One program) in our main Expo app (SDK 30). His device does not have the split-screen feature and he still saw this problem. I think our actual app might’ve crashed on his device due to some code problem.
Is this a known issue in Expo? Is there a workaround to avoid this Android Back Button problem?
EDIT: Being tracked by Expo engineers here: https://github.com/expo/expo/issues/1786. Main problem on Android seems to be memory pressure causing apps to get killed.
Might be a react-native issue.

Odd dropdown/select behavior in phonegap on iOS

We have a phonegap/ionic application targeting iOS. We have been testing with the ipad air simulator (xcode) and ipad air (10.3.3), ipad Pro (11.0.3).
The app is an ionic (v1) app that downloads and loads stand alone html files (the files contain css, html, js in one doc). The documents are typically long forms. In all test environments we are getting odd behavior with selects/drop downs.
When you click/tap on a select the options will appear correctly.
Then when you click/tap somewhere else, blank space or another input field you will usually get the select options bubble again but it will be empty.
In the above image I made my selection from the options and then clicked into the next field.
This was intermittent at first and now it seems to happen all the time. It seems like it has something to do with losing focus but I am unable to see why this is popping back up. I haven't found anything very useful from searching online in regards to this problem.
UPDATE 11/7/17
After more thorough searching this seems to be due to building the app with xcode 9 and/or the use of UIWebView vs WKWebview. I also looked through the code more to see we were already using WKWebView not UIWebView and the problem is still present. As someone mentioned in this thread.
Good thing is Cordova has support for WKWebView too. You have to install the plugin: cordova-plugin-wkwebview-engine

PhoneGap loading although script is running

I am developing a reasonably large application on PhoneGap version 2.8 for Android. The issue that I can't seem to fix or even understand why it is happening is described as follows. When I start the application, initially a white screen is shown, which is completely fine since I undestand that it takes a moment or two to launch cordova. I have added a plugin to the project that puts the application to the background when user clicks "back" button in the "home" view. I can see that my app is still running in the task manager which is all fine and dandy. If I click on the app to bring it to foreground, app returns to foreground but views blank white screen for ~3 seconds, after which my view is rendered. I am wondering if there is any way I could speed up whatever the process is going on. I have noticed that it doesn't happen if my app isn't installed with APK but is run by IDE in debug mode (in which case it runs instantly just like any other normal app), but it still persists, if I click on the app icon in the apps menu.
I know that onDeviceReady event is fired way before the blank screen is gone. I know that some html is added into DOM tree. By the time white screen disappears even my ajax request is back with more data to be displayed on the screen. I know that whatever is, that effect is not because of my scripts being loaded in.
I suspect that this is effect is due to Phonegap taking a moment to restore it's Activity, or WebView to restore (if that makes sense).
I have tested that on different physical devices (Galaxy S2 and S3, HTC One X).
There is alot of optimization still to be done (memory is leaking somewhere, and there seems to be alot of performance issues with older phones eg. HTC One V).
I have tried to show Splashscreen while the white screen is up, but it is hard to estimate, when i should hide it (javascript seems to be running asynchroniously in relation to white screen).
Perhaps anyone would be kind enough to explain what is causing the white screen to be present and what could be done to resolve that issue.
Much obliged,
Erich

Categories