Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]upload and patch err:TypeError: Cannot read property 'map' of undefined #874

Open
Eumenidies opened this issue Jan 12, 2022 · 5 comments
Labels

Comments

@Eumenidies
Copy link

通过命令行make HttpServer-upload 上传发布包时总是报错
upload and patch err:TypeError: Cannot read property 'map' of undefined

cmake:
DL380-Gen9:~/TarsCpp/examples/HttpDemo/build$ cat run-upload-HttpServer.cmake
EXECUTE_PROCESS(COMMAND /usr/bin/cmake -E echo http://192.168.120.50:3000/api/upload_and_publish [email protected] -Fapplication=HttpDemo -Fmodule_name=HttpServer -Fcomment=developer-auto-upload)
EXECUTE_PROCESS(COMMAND curl http://192.168.120.50:3000/api/upload_and_publish?ticket= [email protected] -Fapplication=HttpDemo -Fmodule_name=HttpServer -Fcomment=developer-auto-upload)
EXECUTE_PROCESS(COMMAND /usr/bin/cmake -E echo
---------------------------------------------------------------------------)

上传:
DL380-Gen9:~/TarsCpp/examples/HttpDemo/build$ make HttpServer-upload
[ 60%] Built target HttpServer
[ 80%] call /home/admin/TarsCpp/examples/HttpDemo/build/run-tar-HttpServer.cmake
mkdir -p /home/admin/TarsCpp/examples/HttpDemo/build/tmp/HttpServer
rm -rf /home/admin/TarsCpp/examples/HttpDemo/build/tmp/HttpServer
copy bin/HttpServer /home/admin/TarsCpp/examples/HttpDemo/build/tmp/HttpServer/
HttpServer/
HttpServer/HttpServer
[ 80%] Built target HttpServer-tar
[100%] upload HttpDemo.HttpServer.tgz and publish...
http://192.168.120.50:3000/api/upload_and_publish [email protected] -Fapplication=HttpDemo -Fmodule_name=HttpServer -Fcomment=developer-auto-upload
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 879k 100 71 100 879k 35 433k 0:00:02 0:00:02 --:--:-- 433k
upload and patch err:TypeError: Cannot read property 'map' of undefined

[100%] Built target HttpServer-upload

怀疑是实际调用的shell命令:
curl http://192.168.120.50:3000/api/upload_and_publish?ticket= [email protected] -Fapplication=HttpDemo -Fmodule_name=HttpServer -Fcomment=developer-auto-upload

ticket后面的空格引起的?

@Eumenidies Eumenidies added the bug label Jan 12, 2022
@ruanshudong
Copy link
Contributor

先在平台上启动服务再试一试

@Eumenidies
Copy link
Author

Eumenidies commented Jan 12, 2022

谢谢,确实,我在web页面创建了应用后,再命令行上传发布包,就过了。
不过,返回Method Not Allowed了

  • Trying 192.168.120.50...
  • TCP_NODELAY set
  • Connected to 192.168.120.50 (192.168.120.50) port 3000 (#0)

POST /api/upload_and_publish?ticket= HTTP/1.1
Host: 192.168.120.50:3000
User-Agent: curl/7.58.0
Accept: /
Content-Length: 900418
Content-Type: multipart/form-data; boundary=------------------------cff9e84d0fa2ef48
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4997
< X-RateLimit-Reset: 1641955800
< X-DNS-Prefetch-Control: off
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=15552000; includeSubDomains
< X-Download-Options: noopen
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Content-Type: text/plain; charset=utf-8
< Content-Length: 287
< Surrogate-Control: no-store
< Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
< Expires: 0
< Set-Cookie: dcache=true; path=/
< Set-Cookie: dcache.sig=scJMFEaAFCiiLTfzeo7kcwUW88c; path=/
< Date: Wed, 12 Jan 2022 02:49:46 GMT
< Connection: keep-alive
<
Method Not Allowed
patch serverId: 81, node_name: 172.25.0.3

task no: [db3bfb8d63ac4a5f89d08dd3ca1ff5aa]

172.25.0.3 EM_I_SUCCESS startServer [HttpServer.HttpServer] from 172.25.0.3 :server is activating, please check:

  • Connection #0 to host 192.168.120.50 left intact

@Eumenidies
Copy link
Author

网页上可以正常上传发布包,命令行就,Method Not Allow

@ruanshudong
Copy link
Contributor

Method Not Allow 貌似不影响使用, 这个原因未知

@Eumenidies
Copy link
Author

Method Not Allow 貌似不影响使用, 这个原因未知

谢谢,网页上版本确实更新了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants