Skip to content

contactFind(function (c) { return /.*/.test(c) }) rejected: javascript error: Unexpected token #98

@JasLin

Description

@JasLin

the following exception raise today suddenly

Actual behavior

WARN PuppetWeb contactFind(function (c) { return /.*/.test(c) }) rejected: javascript error: Unexpected token (
JavaScript stack:
SyntaxError: Unexpected token (
    at contactFindAsync (<anonymous>:783:20)
    at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
    at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
    at executeAsyncScript (<anonymous>:329:26)
    at <anonymous>:345:29
    at callFunction (<anonymous>:237:33)
    at <anonymous>:247:23
    at <anonymous>:248:3
  (Session info: chrome=54.0.2840.90)
  (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-45-generic x86_64)
ERR Contact findAll() rejected: javascript error: Unexpected token (
JavaScript stack:
SyntaxError: Unexpected token (
    at contactFindAsync (<anonymous>:783:20)
    at eval (eval at executeAsyncScript (:329:5), <anonymous>:6:16)
    at eval (eval at executeAsyncScript (:329:5), <anonymous>:11:8)
    at executeAsyncScript (<anonymous>:329:26)
    at <anonymous>:345:29
    at callFunction (<anonymous>:237:33)
    at <anonymous>:247:23
    at <anonymous>:248:3
  (Session info: chrome=54.0.2840.90)
  (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-45-generic x86_64)

Steps to reproduce the behavior (and fixes, if any)

it seems function string for eval not work correctly

exceute those functionfilter in chrome:

eval ('function (c) { return /.*/.test(c) }')
eval("function (c) { return c === 'jas' }")

will raise this error

VM456:1 Uncaught SyntaxError: Unexpected token (
    at <anonymous>:1:1

Paste the full output logs here with WECHATY_LOG=silly set

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions