easychen / pushdeer

开放源码的无App推送服务,iOS14+扫码即用。亦支持快应用/iOS和Mac客户端、Android客户端、自制设备
Other
4.62k stars 467 forks source link

[Bug]自建服务器,未能读取数据,因为它的格式不正确 #71

Closed jjss520 closed 2 years ago

jjss520 commented 2 years ago

这是哪里的问题

easychen commented 2 years ago

这是哪里的问题

请按照 调试文档 补全错误信息,以帮助我们定位。

liuhenghu commented 2 years ago

image

jjss520 commented 2 years ago

image

对,我的日志也这样显示 httpd:access] - -1.94.176.34 - - [21/Feb/2022:06:06:30 +0000] "POST /login/idtoken?idToken=eyJraWQiOiJXNldjT0tCIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2FwcGxlaWQuYXBwbGUuY29tIiwiYXVkIjoiY29tLnB1c2hkZWVyLnNlbGYuaW9zIiwiZXhwIjoxNjQ1NTA5OTg4LCJpYXQiOjE2NDU0MjM1ODgsInN1YiI6IjAwMTI3OC4wNThhN2FiYTIwNTQ0YTFiYjUwNGUwYzU2ZTUwZTM2OC4wMjA0IiwiY19oYXNoIjoiRjFLOVBqOXp6Wkd6Ni1qUEVGbFNDQSIsImVtYWlsIjoiampzczUyMEBpY2xvdWQuY29tIiwiZW1haWxfdmVyaWZpZWQiOiJ0cnVlIiwiYXV0aF90aW1lIjoxNjQ1NDIzNTg4LCJub25jZV9zdXBwb3J0ZWQiOnRydWV9.aYF0JSCb9oIIF74-hSMMPU1b3Gblc15yblZPNXjpkSuw9Gi6H66bAJ8pgWJQxXoRiyN7bgMxceA-QMKa6zopI_x69i0K4_YBnRQiQEAV1dad7GMZnro_lU1ajdB6PnfshqhXHfKuPG4RqMpenqkAtU1VWsrdPYXImKU_9OCS6G64LZjbOpu0uIlv-67d1qrCXQnlwf-Q-Nn_E_RfR06r2S9Mi0ufSt7CCud1dcIYhP3JMW025QVRcun0V7fZo6mcFVpqvzCh5_mbfMVXF494jEu7snmvHVQ5U8s1SyPRF9a8ehG339OtxfHhP_KjSN0yo2MmMpMp0HUFQ6XJNrNFww HTTP/1.1" 404 bytesIn:1098 bytesOut:495 reqTime:0

easychen commented 2 years ago
image

我刚才找了台ubuntu测试了下 2310265 reversion ,是可以启动的。所以应该是环境兼容性问题。

看日志接口报 500 错了。可以把 docker-compose.yml 中的 APP_DEBUG 设置为 true ,重新启动后用 postman 发送一下日志里边的请求看看错误信息。

liuhenghu commented 2 years ago

image

ErrorException: file_get_contents(): SSL: Connection reset by peer in file /app/api/vendor/griffinledingham/php-apple-signin/ASDecoder.php on line 59

0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_get_conten...', '/app/api/vendor...', 59)

1 /app/api/vendor/griffinledingham/php-apple-signin/ASDecoder.php(59): file_get_contents('https://appleid...')

2 /app/api/vendor/griffinledingham/php-apple-signin/ASDecoder.php(41): AppleSignIn\ASDecoder::fetchPublicKey('W6WcOKB')

3 /app/api/vendor/griffinledingham/php-apple-signin/ASDecoder.php(28): AppleSignIn\ASDecoder::decodeIdentityToken('eyJraWQiOiJXNld...')

4 /app/api/app/Http/Helpers.php(15): AppleSignIn\ASDecoder::getAppleSignInPayload('eyJraWQiOiJXNld...')

5 /app/api/app/Http/Controllers/PushDeerUserController.php(165): getUserDataFromIdentityToken('eyJraWQiOiJXNld...')

6 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\PushDeerUserController->login(Object(Illuminate\Http\Request))

7 /app/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('login', Array)

8 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\PushDeerUserController), 'login')

9 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()

10 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\Routing\Route->run()

11 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

12 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

13 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))

14 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

15 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(103): Illuminate\Routing\Middleware\ThrottleRequests->handleRequest(Object(Illuminate\Http\Request), Object(Closure), Array)

16 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(55): Illuminate\Routing\Middleware\ThrottleRequests->handleRequestUsingNamedLimiter(Object(Illuminate\Http\Request), Object(Closure), 'api', Object(Closure))

17 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), 'api')

18 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

19 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\Pipeline\Pipeline->then(Object(Closure))

20 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

21 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))

22 /app/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

23 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

24 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))

25 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

26 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

27 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(Object(Illuminate\Http\Request), Object(Closure))

28 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

29 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

30 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle(Object(Illuminate\Http\Request), Object(Closure))

31 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

32 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))

33 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

34 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))

35 /app/api/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

36 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))

37 /app/api/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

38 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Http\Middleware\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))

39 /app/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

40 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then(Object(Closure))

41 /app/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

42 /app/api/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

43 {main}

easychen commented 2 years ago

根据报错信息,这是因为你架设pushdeer的环境无法连接苹果服务器,所以没法用apple账号登录。请确认服务器对外网络和防火墙是否设置正确。

liuhenghu commented 2 years ago

根据报出的信息,无法设置pushdeers的环境无法连接苹果服务器,因为你无法架设苹果账号登录。请确认这是服务器网络和防火墙是否设置正确。

网络是正常的,请问是访问苹果的哪个域名,我测试下

easychen commented 2 years ago

根据报出的信息,无法设置pushdeers的环境无法连接苹果服务器,因为你无法架设苹果账号登录。请确认这是服务器网络和防火墙是否设置正确。

网络是正常的,请问是访问苹果的哪个域名,我测试下

https://github.com/GriffinLedingham/php-apple-signin/blob/153912eca38ae693b33a47523470db80827c5640/ASDecoder.php#L59

liuhenghu commented 2 years ago

根据报出的信息,无法设置pushdeers的环境无法连接苹果服务器,因为你无法架设苹果账号登录。请确认这是服务器网络和防火墙是否设置正确。

网络是正常的,请问是访问苹果的哪个域名,我测试下

https://github.com/GriffinLedingham/php-apple-signin/blob/153912eca38ae693b33a47523470db80827c5640/ASDecoder.php#L59

是我的旁路由影响了,导致无法访问到苹果的服务器,但是服务器网关并没有指向旁路由,这个网络就怪了