Skip to content

RecordNotSaved 通过API上传安装包总是失败 #779

Closed

Description

@likfe

部署方式 | How to Deploy

使用一键部署脚本 | Using zealot-docker on-click install (Default)

部署版本 | Version

nightly (Default)

反代服务 | Reverse Proxy

none

已阅读文档 | Read the document

  • 已阅读 | Yes

描述 | Description

通过API上传APK总是失败

问题日志 | Relevant log output

> POST /api/apps/upload HTTP/1.1
> Host: hostname:9090
> User-Agent: curl/7.79.1
> Accept: */*
> Content-Length: 175335
> Content-Type: multipart/form-data; boundary=------------------------b6b59b6b78926b73
>
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 422 Unprocessable Entity
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< Server: Caddy
< X-Request-Id: bfd472df-5619-4d3f-9556-fd4112072aac
< X-Runtime: 0.479252
< Date: Mon, 06 Jun 2022 10:47:17 GMT
<
* Connection #0 to host hostname left intact


method=POST path=/api/apps/upload format=*/* controller=Api::Apps::UploadController action=create status=422 duration=191.99 view=0.00 db=4.90 time=2022-06-06 18:44:32 +0800 exception=["ActiveRecord::RecordNotSaved", "You cannot call create unless the parent is saved"] exception_object=You cannot call create unless the parent is saved ip=x.x.x.x token=0c3082bdec82de88d7d8fa92c4450667 channel_key=

Activity

  1. welcome commented on Jun 6, 2022

    @welcome

    感谢你提交的问题或反馈,我会在有时间的时候回复在此期间你可以看看之前被解决的反馈说不定有你需要的答案。
    Thanks for opening this issue, a maintainer will get back to you shortly!

  2. likfe commented on Jun 6, 2022

    @likfe
    Author
    curl -v -X POST \
      'http://xxx.xxx.xxx:9090/api/apps/upload' \
       --form 'token="0c3082bdec82de88d7d8fa92c4450667"' \
       --form 'file=@/Users/xx/TestActivity.apk'
  3. icyleaf commented on Jun 6, 2022

    @icyleaf
    Member

    找到大概的问题了,明天具体分析下。

    建议在页面上创建应用,获取 channel_key 并传参上传可以解决这个问题。

  4. icyleaf commented on Jun 9, 2022

    @icyleaf
    Member

    建议使用 #779 (comment) 的方法上传应用,如果执意保持现状可重新拉取 nightly 部署即可,有问题再重开。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions