Skip to content
This repository was archived by the owner on Aug 25, 2022. It is now read-only.

TypeError: image.grayscale(...).invert(...).threshold is not a function #104

@xiaoyue10131748

Description

@xiaoyue10131748

运行 nosmoke
浏览器和simulator都能运行起来,不过在OCR分析图片的时候报错了,请问可能是什么原因呢

udid: undefined
config loaded:
{"testingPeriod":1800,"testingDepth":8,"takeScreenShot":true,"newCommandTimeout":20,"launchTimeout":20,"packages":".*","maxActionPerPage":15,"asserts":[],"targetElements":{},"exclusivePattern":"","platform":"ios","clickTypes":[],"editTypes":[],"horizontalScrollTypes":[],"verticalScrollTypes":[],"tabBarTypes":[],"exclusiveTypes":[],"blacklist":[],"strategy":"ocr","depth":100,"duration":1800,"triggers":[],"exclude":[],"deviceType":"iPhone 8","configFile":"/usr/local/lib/node_modules/nosmoke/demo/crawler.config.yml"}

<-- GET /

html reporter generated: /usr/local/lib/node_modules/nosmoke/reports/2022-2-20-0-56-36/report.html
--> GET / 200
initialize crawler
generating ios logs
default dip-px ration returned, current device: iphone8
html reporter generated: /usr/local/lib/node_modules/nosmoke/reports/2022-2-20-0-56-36/report.html
=======> event ---------- refresh screen starts: 1645336641
=======> event refresh screen recieving data: 1645336641
Caught exception: TypeError: image.grayscale(...).invert(...).threshold is not a function
-----> Crawling Finished: <-----
TypeError: image.grayscale(...).invert(...).threshold is not a function
at Jimp. (/usr/local/lib/node_modules/nosmoke/lib/crawler/ocr-impl/ocr-crawler.js:461:18)
at Timeout._onTimeout (/usr/local/lib/node_modules/nosmoke/node_modules/jimp/node_modules/@jimp/core/dist/index.js:331:25)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions