Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Exception being thrown on load in Firefox #2

Copy link
Copy link
@jacobh

Description

@jacobh
Issue body actions

I'm not entirely sure if this is a problem with the library or our implementation, however it seems to be working in all other browsers.

this function here Is throwing the exception can't convert undefined to object, specifically on the ? 'px' : '' line.

The full error is

NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [nsIDOMWindow.getComputedStyle]
[Break On This Error]   

? 'px' : ''

The code that I'm calling pubnub from is

item_template = _.template $('#post-stream-item-tmpl').text()
schema = $.parseJSON($('#post-stream-item-schema').text())['5']
channels = $('#post-stream-item-tmpl').data 'channel'

callback = (schemaless_data) ->
    console.log schemaless_data
    data = datascheme.load schema, schemaless_data
    if data.v
        if data.v >= 2 and data.type is "discussion"
            this_dtf = dtf data.content.post_date
            data.content.formatted_date_time = this_dtf()

            for id, stock of data.content.stocks
                stock.url = stock.page_slug.split('-').join('/')
                data.content.stocks[id] = stock

            rendered = item_template data.content
            line = $($.parseHTML rendered)
            line.hide().prependTo($(".live-stream")).slideDown 500
            line.data 'tmpl-data', JSON.stringify data.content

            update_datetime line, this_dtf
            return

history_callback = (history_data) ->
    messages = history_data.shift()
    for message in messages
        callback message

pubnub = PUBNUB.init
    publish_key: 'redacted'
    subscribe_key: 'redacted'
    ssl: no

pubnub.ready()

for channel in channels.split(',')
    console.log "channel: #{channel}"
    pubnub.history
        channel: channel
        limit: 50
    , history_callback

pubnub.subscribe
    channel: channels
    callback: callback

The channel console.log appears in firebug before the error occurs.

If it will help I can email you a link to our private testing site so you can see the issue for yourself. I understand details are rather sparse in this issue, I'm stumped as to what's going wrong.

Thanks,
Jacob

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.