wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

error following step by step instructions #37

Closed ZhiminHeGit closed 3 years ago

ZhiminHeGit commented 3 years ago

i got the following errors when following the step by step instruction. please advise. thank you!

npm install wechaty@latest --registry=https://r.npm.taobao.org

npm WARN deprecated raven@2.6.4: Please consider upgrading to @sentry/node npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm ERR! code 1 npm ERR! path /Users/user/my-padlocal-bot/node_modules/grpc npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@15.5.1 | darwin | x64 npm ERR! gyp info find Python using Python version 3.7.4 found at "/usr/local/opt/python/bin/python3.7" npm ERR! gyp info spawn /usr/local/opt/python/bin/python3.7 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/user/my-padlocal-bot/node_modules/grpc/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/user/Library/Caches/node-gyp/15.5.1/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/user/Library/Caches/node-gyp/15.5.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/user/Library/Caches/node-gyp/15.5.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/user/my-padlocal-bot/node_modules/grpc', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:376:20) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:284:12) npm ERR! gyp ERR! System Darwin 20.2.0 npm ERR! gyp ERR! command "/usr/local/Cellar/node/15.5.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /Users/user/my-padlocal-bot/node_modules/grpc npm ERR! gyp ERR! node -v v15.5.1 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

Randolph603 commented 3 years ago

Having same issue when use node.js 15.6.0. Downgrade to LTS 14.15.4. But when QR code generated, no mater pad scan or mobile scan, the login event will not fired so does message event. At the last it throw the sever error with timeout.

TestBot started
18:09:16 INFO 
      ============================================================
       Welcome to Wechaty PadLocal puppet!

       - wechaty-puppet-padlocal version: 0.2.26
       - padlocal-ts-client version: 0.2.19
      ============================================================

18:09:16 WARN loginPolicy: 0 
18:09:28 INFO [PuppetPadlocal] start login with type: QrLogin
onScan: Waiting(2) - https://api.qrserver.com/v1/create-qr-code/?data=http%3A%2F%2Fweixin.qq.com%2Fx%2FAdHYT_jb_vb16NDOl1hE
18:14:34 ERR [PuppetPadlocal] login failed: VError: [tid:453be32e] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:453be32e] check qr code timeout
padlocal commented 3 years ago

Are you trying to signed on with foreign IP? If so, PadLocal only supports China Mainland IP to sign on at this moment. You can try to deploy your app on mainland server to check whether it works. This is a known issue, will be fixed later.

padlocal commented 3 years ago

close due to kown foreign ip issue