0

我是 Erlang 和电话方面的新手。我正在尝试通过 Pusher 发送的推送通知唤醒 iOS 应用程序,这是一个使用 apns4erl 完成工作的 Kazoo 模块。当 Pusher 尝试发送通知时,它应该启动 apns 但它收到此错误:

10:44:22.756 [error] |0000000000|Undefined:Undefined(<0.29186.843>) gen_statem 'apns_com.test.viavoip' in state connected terminated with reason: {'function not exported',{string,lowercase,1}} in gun:normalize_headers/1 line 661
10:44:22.756 [error] |0000000000|string:Undefined(<0.29186.843>) CRASH REPORT Process 'apns_com.test.viavoip' with 0 neighbours crashed with reason: call to undefined function string:lowercase(<<"apns-topic">>)
10:44:22.756 [error] |0000000000|Undefined:Undefined(<0.26408.843>) Supervisor apns_sup had child apns_connection started with {apns_connection,start_link,undefined} at <0.29186.843> exit with reason undef in context child_terminated
10:44:22.760 [error] |0000000000|Undefined:Undefined(<0.31997.843>) gen_server pm_apple terminated with reason: {undef,{gen_statem,call,[<0.29186.843>,{push_notification,<<"ac79eb0d7f28ee04d3539b80a3b6f519cc3db78e7b3840f18b497fadcedc5264">>,<<"{\"aps\":{\"alert\":{\"loc-args\":[\"1089 - Dario Test3\"],\"loc-key\":\"IC_SIL\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"sound\":\"ring.caf\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"caller-id-name\":\"Dario Test3\",\"caller-id-number\":\"1089\",\"proxy\":\"sip:94.138.35.201:5060\",\"registration-token\":\"4ad4ad69-6939-4f04-ada6-e827983a4b23\",\"utc_unix_timestamp_ms\":\"16...">>,...},...]}} in gen:do_call/4 line 177
10:44:22.760 [error] |0000000000|Undefined:Undefined(<0.31997.843>) CRASH REPORT Process pm_apple with 0 neighbours exited with reason: {undef,{gen_statem,call,[<0.29186.843>,{push_notification,<<"ac79eb0d7f28ee04d3539b80a3b6f519cc3db78e7b3840f18b497fadcedc5264">>,<<"{\"aps\":{\"alert\":{\"loc-args\":[\"1089 - Dario Test3\"],\"loc-key\":\"IC_SIL\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"sound\":\"ring.caf\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"caller-id-name\":\"Dario Test3\",\"caller-id-number\":\"1089\",\"proxy\":\"sip:94.138.35.201:5060\",\"registration-token\":\"4ad4ad69-6939-4f04-ada6-e827983a4b23\",\"utc_unix_timestamp_ms\":\"16...">>,...},...]}} in gen_server:terminate/7 line 812
10:44:22.761 [error] |0000000000|Undefined:Undefined(<0.30380.843>) Supervisor pusher_module_sup had child pm_apple started with pm_apple:start_link() at <0.31997.843> exit with reason {undef,{gen_statem,call,[<0.29186.843>,{push_notification,<<"ac79eb0d7f28ee04d3539b80a3b6f519cc3db78e7b3840f18b497fadcedc5264">>,<<"{\"aps\":{\"alert\":{\"loc-args\":[\"1089 - Dario Test3\"],\"loc-key\":\"IC_SIL\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"sound\":\"ring.caf\"},\"call-id\":\"2d25fee2-74d9-43c7-9bfe-90a167f5941a\",\"caller-id-name\":\"Dario Test3\",\"caller-id-number\":\"1089\",\"proxy\":\"sip:94.138.35.201:5060\",\"registration-token\":\"4ad4ad69-6939-4f04-ada6-e827983a4b23\",\"utc_unix_timestamp_ms\":\"16...">>,...},...]}} in context child_terminated

apns 似乎因此无法启动:string:lowercase(<<"apns-topic">>). 在 erl 控制台中,此命令工作正常,可能版本错误或配置错误的依赖很少。

有什么建议吗?

4

0 回答 0