Skip to content

Creating new client throws "Cannot read property 'Client' of undefined" #101

@dandonahoe

Description

@dandonahoe

All is good an well until this line:

var client = new Paho.MQTT.Client(requestUrl, clientId);

Where I get the error message

Uncaught Error: Cannot read property 'Client' of undefined
    at App.initClient (eval at <anonymous> (bundle.js:2341), <anonymous>:201:53)
    at App.proxiedMethod (eval at <anonymous> (bundle.js:3565), <anonymous>:44:30)
    at eval (eval at <anonymous> (bundle.js:2341), <anonymous>:185:22)
    at eval (eval at <anonymous> (bundle.js:4603), <anonymous>:123:23)
    at Response.eval (eval at <anonymous> (bundle.js:4651), <anonymous>:258:7)
    at Request.eval (eval at <anonymous> (bundle.js:4729), <anonymous>:358:18)
    at Request.callListeners (eval at <anonymous> (bundle.js:4687), <anonymous>:105:20)
    at Request.emit (eval at <anonymous> (bundle.js:4687), <anonymous>:77:10)
    at Request.emit (eval at <anonymous> (bundle.js:4729), <anonymous>:671:14)
    at Request.transition (eval at <anonymous> (bundle.js:4729), <anonymous>:22:10)

When debugging on the line where Client was supposed to be instantiated, devtools show this:

screen shot 2017-02-14 at 7 47 39 pm

So I can't figure out what I'm doing wrong. About 95% of this is AWS example code. Any ideas?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions