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

Post 方法出错:User process exit when running #12

Closed
btguys opened this issue Jul 7, 2020 · 2 comments
Closed

Post 方法出错:User process exit when running #12

btguys opened this issue Jul 7, 2020 · 2 comments

Comments

@btguys
Copy link

btguys commented Jul 7, 2020

composer.json
"require": {
"php": "^7.3",
"fideloper/proxy": "^4.0",
"jenssegers/agent": "^2.6",
"laravel/framework": "^6.0",
"laravel/tinker": "^1.0",
"predis/predis": "^1.1"
},

试了好几个项目,当form提交 POST 请求就抛出错误。

腾讯云 函数服务里的详细日志:
返回数据:

{"errorCode":-1,"errorMessage":"User process exit when running"}

日志:

START RequestId: 01dbddd5156aeac3ec4b69cf8800c6c6

Event RequestId: 01dbddd5156aeac3ec4b69cf8800c6c6

Fatal error: Uncaught TypeError: Argument 2 passed to Symfony\Component\HttpFoundation\Request::createRequestFromFactory() must be of the type array, null given, called in /var/user/vendor/symfony/http-foundation/Request.php on line 410 and defined in /var/user/vendor/symfony/http-foundation/Request.php:1976

Stack trace:

#0 /var/user/vendor/symfony/http-foundation/Request.php(410): Symfony\Component\HttpFoundation\Request::createRequestFromFactory(Array, NULL, Array, Array, Array, Array, NULL)

#1 /var/user/serverless-handler.php(71): Symfony\Component\HttpFoundation\Request::create('/', 'POST', NULL, Array, Array, Array)

#2 /var/runtime/php7/bootstrap.php(46): handler(Object(stdClass), Object(stdClass))

#3 /var/runtime/php7/bootstrap.php(204): _scf_bootstrap\EventHandler->handle(Object(stdClass), Object(stdClass))

#4 /var/runtime/php7/bootstrap.php(227): _scf_bootstrap__main_for_scf()

#5 {main}

thrown in /var/user/vendor/symfony/http-foundation/Request.php on line 1976

ERROR RequestId:01dbddd5156aeac3ec4b69cf8800c6c6 Result:{"errorCode":-1,"errorMessage":"User process exit when running"}

END RequestId: 01dbddd5156aeac3ec4b69cf8800c6c6

Report RequestId: 01dbddd5156aeac3ec4b69cf8800c6c6 Duration:24ms Memory:128MB MemUsage:17.714844MB

@btguys
Copy link
Author

btguys commented Jul 7, 2020

实测了一下好像 form 只可以提交 json 数据,普通的表单会报错。这部分如果不支持 迁移的改动挺大的。

@yugasun
Copy link
Contributor

yugasun commented Feb 23, 2021

最新版已支持提交表单数据

@yugasun yugasun closed this as completed Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants