问题描述
我正在尝试将 Pusher 与我使用 Backbone.js 的 Web 应用程序集成.我正在关注 Pusher 文档中的 Pusher with Backbone 指南.
I am trying to integrate Pusher with my web application that uses backbone.js. I'm following the Pusher with Backbone guide in the Pusher docs.
所以我看到这个错误在应用程序启动时出现在 Web 控制台中
So I'm seeing this error pop up in the web console on application start up
Pusher : Error : {"type":"PusherError","data":{"code":4005,"message":"Path not found"}}
这个找不到的路径"是什么?我在 Pusher 文档中什么也没找到.
What is this 'path' that cannot be found? I found nothing in the Pusher docs.
推荐答案
4005 错误通常意味着您使用的 WebSocket URL 未标识要连接的应用程序.
A 4005 error generally means that the WebSocket URL you are using doesn't identify an application to connect to.
就 Pusher JavaScript 库的使用而言,这意味着您可能已向 Pusher
构造函数提供了一个空字符串作为 app_key
.
In terms of usage of the Pusher JavaScript library this means you've likely supplied an empty string as the app_key
to the Pusher
constructor.
var pusher = new Pusher('');
你可以在这里看到这个:http://jsbin.com/evulaj/1/edit
You can see this in action here:http://jsbin.com/evulaj/1/edit
打开 JavaScript 控制台查看错误.您还可以通过检查 pusher.key
来检查设置的 app_key
值.
Open the JavaScript console to see the error. You can also check the app_key
value set by checking pusher.key
.
注意:我很欣赏这个错误有点神秘.我看看我们能不能解决这个问题
这篇关于如何调试“4005 Path Not Found"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!