tjwoon / csZBar

Cordova plugin to integrate with the ZBar barcode scanning library.
Other
143 stars 181 forks source link

Hangs on iOS (latest) @ Oct 2016 // A scan is already in progress #87

Closed ullfindsmit closed 7 years ago

ullfindsmit commented 8 years ago

The most recent build via phonegap build is not loading the scanner for iOS only It works fine on Android

On second attempt, it says A scan is already in progress

Please help

cepm-nate commented 8 years ago

I am seeing the same thing, and it's a pity as zbar is the fastest scanner I've found for iOS.

dcousens commented 8 years ago

Have you pulled the latest version from this repository?

ullfindsmit commented 8 years ago

I am using phonegap build which pulls directly

cepm-nate commented 8 years ago

I was using a branch of it to limit scanning to just the red line (useful when there are many 1D barcodes close together) but have switched to the official phonegap-plugin-barcode scanner (with jlowe234's branch) as it seems to be updated a little more frequently, and limits scanning to just along the red line.

Thanks for all the work dcousens! I'll check back occasionally to see if there's a way to limit the scanning rectangle for both iOS and Android. :-)

gitlovenotwar commented 8 years ago

I had the same issue. It asks to open the camera but the camera did not show, and opening scanner again returns error with "A scan is already in progress".

Thamodharank commented 8 years ago

Hello All,

I too face the same problem for the recent build.

In iOS, the scanner does not open and throws the "A scan is already in progress" error for the second time.

Did anyone find a solution?

ullfindsmit commented 8 years ago

Here is a little more details from console log within XCode

2016-10-21 15:15:36.221162 MyApp[722:139008] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2016-10-21 15:15:36.228703 MyApp[722:139008] [MC] Reading from public effective user settings. 2016-10-21 15:15:36.304453 MyApp[722:139008] * WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: * -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 1]

nrcrabbe commented 8 years ago

Here's how I got around it.

ionic plugin rm cordova-plugin-cszbar ionic plugin add https://github.com/tjwoon/csZBar.git#master

(use cordova plugin ... if not using ionic)

The npm release won't be new enough so you'll need to fall back to the git repository

HTH

ullfindsmit commented 8 years ago
phonegap plugin rm cordova-plugin-cszbar
phonegap plugin add https://github.com/tjwoon/csZBar.git#master
phonegap platform remove ios
phonegap platform add ios

Did the trick

gitlovenotwar commented 8 years ago

@nrcrabbe This really works, nice! Thanks!!!