openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.38k stars 2.79k forks source link

Multiple touch in manipulating smart phone page causes an error #1180

Open att55 opened 4 years ago

att55 commented 4 years ago

What is the issue or idea you have?

When using like Microsoft Surface, multiple touch in a manipulating smart phone page causes an error. After the error, STF always returns the error unless the STF process is restarted...

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.

No, this error occurs any devices.

Please provide the steps to reproduce the issue.

precondtion: Use Surface or Tablet to touch display.

  1. Open a manipulating smart phone page. (after chose a smart phone from a list)
  2. Touch a smart phone area.
  3. At the same time, touch the area other than a smart phone. (like upload application)
  4. The error occurs.

What is the expected behavior?

Does not occur the error.

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.

The error log is following.

/usr/lib/node_modules/stf/node_modules/protobufjs/dist/ProtoBuf.js:2641
                    throw Error("Illegal value for "+this.toString(true)+" of type "+this.type.name+": "+val+" ("+msg+")");
                    ^

Error: Illegal value for Message.Field .TouchMoveMessage.contact of type uint32: undefined (not an integer)
    at Field.<anonymous> (/usr/lib/node_modules/stf/node_modules/protobufjs/dist/ProtoBuf.js:2641:27)
    at Field.ProtoBuf.Reflect.FieldPrototype.verifyValue (/usr/lib/node_modules/stf/node_modules/protobufjs/dist/ProtoBuf.js:2675:29)
    at MessagePrototype.set (/usr/lib/node_modules/stf/node_modules/protobufjs/dist/ProtoBuf.js:1799:63)
    at new Message (/usr/lib/node_modules/stf/node_modules/protobufjs/dist/ProtoBuf.js:1728:42)
    at Socket.<anonymous> (/usr/lib/node_modules/stf/lib/units/websocket/index.js:466:31)
    at emitTwo (events.js:126:13)
    at Socket.emit (events.js:214:7)
    at /usr/lib/node_modules/stf/node_modules/socket.io/lib/socket.js:528:12
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)

This error occurred in protobufjs. I think the version of protobuffjs in STF is too old... 🤔

koral-- commented 4 years ago

Thanks for the report. Regarding protobuf version, there is a PR for that: https://github.com/openstf/stf/pull/1161 Dependencies will be updated soon.

att55 commented 4 years ago

@koral-- Thank you SO much for your reply !! 😄 I added comment to this issue report. Please check when you can 🙏

After the error, STF always returns the error unless the STF process is restarted...

I think there is a possibility this error occurs by STF... 🤔 Do you think is the cause, STF or protobufjs?

att55 commented 4 years ago

I tried to start stf after changed protobufjs to latest version. But an error occurred as below... 😓

ProtoBuf.loadProtoFile is not a function
/Users/atyamash/Create/github.com/stf/node_modules/bluebird/js/main/promise.js:680

It seems that the structure of protobufjs has been changed significantly.

att55 commented 4 years ago

@koral-- Hi, if PR#1180 is released, this issue will be resolved. Should I close this issue?

koral-- commented 4 years ago

Autobuild including that PR should be available. I would leave this issue open for now. Just catching an exception does not look like a final solution.

att55 commented 4 years ago

I would leave this issue open for now.

OK, let's do so 👍