Hi,I was able to integrate zebra scanner with app and it was successsfullly generated mobile build until with MABS 11.0.However, MABS 11.0 has been obsolete yesterday & due to which mobile build is also throwing below error.
TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ERR_INVALID_ARG_TYPE')
at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
at /usr/lib/node_modules/cordova/bin/cordova:32:22
Is anyone using zebra plugin could solve this issue ?Any pointers are appreciated.Thanks,
vani
Hi @Vani Mankad,
We were able to solve the issue.
Please change the extensibility configurations to: { "plugin": { "url": "https://github.com/os-adv-dev/darryncampbell-cordova-plugin-intent" }}
@João Lopes, if you can, please release a new version of the component pointing to the new Git repository.
Thanks! :)
Hi @Baljit Singh ,PFB details -
2. Remove call to disablescanner event from IsScannerActive client action -
As you can see in the demo - IsScannerActive event is mentioned in handler & inside the logic it is calling disablescanner. I just removed it for safer side. It usually disables scanner if it is not active.
3. Modified TrigerPress action code - replaced "Toggle_scanning" to "Start_Scanning"
Trigerpress action is called on ScanOnClick of webblock
I changed that script inside plugin with -"Start_Scanning" instead of Toggle.
hi @Vani Mankad
You can check this links:
https://www.outsystems.com/forums/discussion/55919/zebra-datawedge-connector-plugin-errormessage-and-failing-to-generate-android-b/
https://www.outsystems.com/forums/discussion/65639/zebra-datawedge-connector-plugin-error-compiling-to-android/
I hope this helps
Thanks
Hello @Vani Mankad
We faced a similar issue a while back for ODC.
If you read the documentation regarding the MABS (here), you will notice that a while back the MABS works with Android X. Due to this, some apps using ZebraPlugin weren't generated properly.
When you open this plugin library in the IDE, you will notice that it is using darryncampbell-cordova-plugin-intent .
Digging deeper we discovered, that there are 2 version that are available. Before Android support and Android X support.
See: https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/tree/master?tab=readme-ov-file#android-x-support
At that time we solved it by:
IMPORTANT: This only works until MABS (11.0), for MABS (11.1) we are still looking for a solution.
Maybe @João Lopes has some other ideas?
Hope this helps
Hi @Baljit Singh,Thank you for your detailed response.Yes, I have done all above steps and able to generate the app with MABS 11.0 & the plugin is working fine. Exetnsibility configuration is set to now -
I am stuck with the issue to generate mobile app with MABS 11.1 version and have been looking into this sicne days but no solution yet.
I tried plugins for O11 and ODC & both of them are using the same plugin and throwing same error.
Unfortunately since it is unsupported plugin, Outsystems support is limited here.
I see that MABS 11 will be obsolete next month - how are you planning forward in this scenerio ?Thanks,Vani
Hi André Gonçalves,
Thank you so much. This indeed solved the issue of generating mobile apk with MABS 11.1.
however, I see that it takes almost 30 sec to activate the scanner i.e. it scans the barcode first time after almost 20 clicks on device in built scanner.
Is there any specific changes done related to the event where scan is received or scanner is activated ?
@Baljit Singh , @Vincent Drent - Do you also face above issue while scanning ?Again Many thanks for solving the mobile app generation issue.Thanks,Vani
Hey all
By adding this to extensibility configurations, the app generation issue has indeed been solved.
As @Vani Mankad mentioned this heavily impacts the performance now. For example the previous loading time of the Zebra scanner was somewhere between 2 - 5 seconds, now it has been increased sometimes being 5 seconds, and sometimes being over 60 seconds.
The scanned value itself is immediately registered and processed. It's the initialization that is causing performance issues.
@André Gonçalves, are there any configurations in git repo that could be tweaked to fix this?
See: https://github.com/os-adv-dev/darryncampbell-cordova-plugin-intent
What we have seen with other implementation, is that the performance is impacted when the scanner is used in multiple screens: the DataWedge instance (which manages scanner input) is taking time to initialize when switching between screens, leading to delays and inconsistent behaviour. Does that apply to you as well, Baljit?
To resolve this, you could implemented a solution where a separate DataWedge profile is created and initialized for each screen. This approach ensures faster and more reliable scanner activation, regardless of which screen the user is on.
Hey @Wouter Baeten
In the app, we are using the block "ScanEventWB" on each screen, as all the (un)register logic is handeld by the plugin. It is indeed the similar behaviour as you have mentioned.
We'll experiment with the suggested implementation, and will update you here.
Hi @Baljit Singh ,
I have solved this issue by doing following changes in the code -
1) As @Wouter Baeten mentioned, For different screens - use separate "ScanEventWB" webblock & update different profile name values
2) Remove call to disablescanner event from IsScannerActive client action
3) Modified TigerPress action code - replaced "Toggle_scanning" to "Start_Scanning"
Above changes solved performance issue.
Happy to help more if needed. Please reach out :)
Thanks,Vani
Hey @Vani Mankad
I do see some improvements, that's a good sign.
Could you please look into some question below?I have followed the mentioned steps: