7 Replies Latest reply on Jan 30, 2013 8:22 AM by Dan McCabe

    Bug report? - scanning.

    Dan McCabe

      I am finding scanning is very flaky.

      Sometimes it works great.

      Sometimes I see entries like the following in the rho log file and my callback doesn't fire, thus the scan is "eaten".

      In my real program, the problem seems to happen at the very beginning of the program, before the user has pressed any physical keys.

       

      In the test html provided below, sometimes it works ok for 5 or 10 scans then starts failing.

      I'm scanning the exact same physical barcode each time.

       

      The error messages in the rholog.txt file are of the form:

       

      I 01/22/2013 10:39:05:000 4d2454be RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: ReferenceError: Can't find variable: rtCheckDigit$

       

      or

       

      I 01/22/2013 10:39:47:000 4d2454be RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Unexpected token ':'

       

      My device specifics:

       

      Motorola MC9500

      CE OS 5.2.20963 Build 20963.1.5.2

      OEM version 03.19.0044

      Installed Rho via :RhoElements 2.0.5.27.0 WM Runtime.cab

       

      My test HTML.

       

      <!DOCTYPE html>

      <html>

      <head>

      <meta charset="UTF-8" />

      <META HTTP-EQUIV="scanner" content="DecodeEvent:url('javascript:gotRhoScan('%1', '%2', '%6');')">

      <script type="text/javascript">

       

          function go(){

              scanner.enable();

          }

       

          function gotRhoScan(data, source, event) {

              console.log("gotRhoScan: " + data + " " + source + " " + event)

              try {

                  if(event != 'Decode') {

                      console.log("gotRhoScan: non decode event: "+event);

                      return;

                  }

                 

                  alert(data);

                 

              } catch(err) {

                  console.log(err);

              }

          }  

       

      </script>

         

      </head>

      <body onload="go();">

      Scan now.<br />

      You should get one alert box for every scan.<br />

      </body>

      </html>   

        • Re: Bug report? - scanning.
          Glenn Sayer

          Dan,

           

          Make sure DataWedge is off as this could affect Rho scanning.

           

          http://docs.rhomobile.com/rhoelements/scanner

          see section "DataWedge Interaction With Native Apps"

            • Re: Bug report? - scanning.
              Dan McCabe

              Thx,

               

              Datawedge was not installed, never mind running.

               

              My solution to this issue was actually to install and use datawedge and comment out my scanner meta tag.

                • Re: Bug report? - scanning.
                  Glenn Sayer

                  I would upgrade to Rho 2.2, the version you are on is about a year old and I know 2.2 fixed seversl scanning issues.

                    • Re: Bug report? - scanning.
                      Dan McCabe

                      Same problem in 2.2.1.13.

                      It appears to be specific to the MC9500, as the same app works without issue on the MC65.

                        • Re: Bug report? - scanning.
                          Glenn Sayer

                          one thing to try.  change

                          from

                          <META HTTP-EQUIV="scanner" content="DecodeEvent:url('javascript:gotRhoScan('%1', '%2', '%6');')">

                          to

                          <META HTTP-Equiv="scanner" Content="DecodeEvent:url('javascript:doScan(%json);')">

                           

                           

                           

                          wondering if you are getting some bad data returned in your data.  if so this could casue this type of error in a string value.

                          • Re: Bug report? - scanning.
                            Darryn Campbell

                            1 for Glenn's suggestion above, I can't think of anything obvious that could be causing this behaviour, especially not specific to the MC9500 but we have concentrated our testing on the JSON return format so logically that would be more robust.  Also agree about the potential bad data being returned, depending on your symbology try increasing the number of check digits or linear security level.

                              • Re: Bug report? - scanning.
                                Dan McCabe

                                Glenn,

                                 

                                Thanks for the suggestion.  The json approach does seem to resolve the problem.

                                 

                                Darryn,

                                 

                                In case you ever get to the bottom of your stack, here are some more log records from when it breaks:

                                Note that in all these circumstances I am scanning the exact same physical label AND I AM getting the scanner decode beep.

                                Obviously, I don't have any visibility to what is going on under the covers, but I'm very surprised to learn that there is anything in the code path that would cause Rho to bomb after the scan engine has done the decode.

                                 

                                Also, note that those errors are not getting caught in my error handler, so they clearly aren't coming from the code that I control.

                                 

                                I 01/30/2013 06:21:34:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0144'

                                I 01/30/2013 06:21:35:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0130'

                                I 01/30/2013 06:21:35:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0145'

                                I 01/30/2013 06:21:36:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0145'

                                I 01/30/2013 06:21:36:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0130'

                                I 01/30/2013 06:21:37:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0143'

                                I 01/30/2013 06:21:37:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0146'

                                I 01/30/2013 06:21:38:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0172'

                                I 01/30/2013 06:21:38:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0142'

                                I 01/30/2013 06:21:39:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0148'

                                I 01/30/2013 06:21:39:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0141'

                                I 01/30/2013 06:21:40:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0173'

                                I 01/30/2013 06:21:40:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0148'

                                I 01/30/2013 06:21:40:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0142'

                                I 01/30/2013 06:21:41:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0141'

                                I 01/30/2013 06:21:41:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0180'

                                I 01/30/2013 06:21:41:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0148'

                                I 01/30/2013 06:21:42:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0142'

                                I 01/30/2013 06:21:42:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0171'

                                I 01/30/2013 06:21:42:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0146'

                                I 01/30/2013 06:21:42:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0143'

                                I 01/30/2013 06:21:43:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0162'

                                I 01/30/2013 06:21:43:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0145'

                                I 01/30/2013 06:21:43:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0144'

                                I 01/30/2013 06:21:44:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0130'

                                I 01/30/2013 06:21:44:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0144'

                                I 01/30/2013 06:21:44:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0146'

                                I 01/30/2013 06:21:44:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Unexpected string ', '

                                I 01/30/2013 06:21:45:000 8d6e9416 RhoWKBrowserEngine.cpp: 359| JS Log: undefined, line 1: SyntaxError: Invalid character '\u0144'