Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spacebro GUI crashes when receiving big objects #24

Open
negabakuru opened this issue Jul 13, 2017 · 0 comments
Open

spacebro GUI crashes when receiving big objects #24

negabakuru opened this issue Jul 13, 2017 · 0 comments

Comments

@negabakuru
Copy link

I use spacebro with my app to broadcast infos about requests made to the twitter API.
After my app posts a tweet, I want to send twitter's response through spacebro.
The object I send to spacebro looks like this:

{ action: 'twitter',
  success: true,
  code: 200,
  response: 
   { created_at: 'Thu Jul 13 13:48:56 +0000 2017',
     id: 88549626914526900,
     id_str: '88549626914529689',
     text: 'test https://t.co/5ocVLM2nB',
     truncated: false,
     entities: 
      { hashtags: [],
        symbols: [],
        user_mentions: [],
        urls: [],
        media: [Array] },
     extended_entities: { media: [Array] },
     source: '<a href="http://nourlyet.com" rel="nofollow"></a>',
     in_reply_to_status_id: null,
     in_reply_to_status_id_str: null,
     in_reply_to_user_id: null,
     in_reply_to_user_id_str: null,
     in_reply_to_screen_name: null,
     user: 
      { id: 84235409,
        id_str: '84235409',
        name: '',
        screen_name: '',
        location: '',
        description: '',
        url: null,
        entities: [Object],
        protected: true,
        followers_count: 23,
        friends_count: 195,
        listed_count: 1,
        created_at: 'Sun Sep 23 20:25:29 +0000 2012',
        favourites_count: 79,
        utc_offset: 10800,
        time_zone: 'Athens',
        geo_enabled: false,
        verified: false,
        statuses_count: 130,
        lang: 'fr',
        contributors_enabled: false,
        is_translator: false,
        is_translation_enabled: false,
        profile_background_color: '131516',
        profile_background_image_url: 'http://abs.twimg.com/images/themes/theme14/bg.gif',
        profile_background_image_url_https: 'https://abs.twimg.com/images/themes/theme14/bg.gif',
        profile_background_tile: true,
        profile_image_url: 'http://pbs.twimg.com/profile_images/2642587671/adf9719e65fb9abafbc6a8fd5003ed1_normal.jpeg',
        profile_image_url_https: 'https://pbs.twimg.com/profile_images/2642587671/adf9719e65fb9abafbc6a8fd5003ed1_normal.jpeg',
        profile_link_color: '000000',
        profile_sidebar_border_color: '000000',
        profile_sidebar_fill_color: '000000',
        profile_text_color: '000000',
        profile_use_background_image: true,
        has_extended_profile: false,
        default_profile: false,
        default_profile_image: false,
        following: false,
        follow_request_sent: false,
        notifications: false,
        translator_type: 'none' },
     geo: null,
     coordinates: null,
     place: null,
     contributors: null,
     is_quote_status: false,
     retweet_count: 0,
     favorite_count: 0,
     favorited: false,
     retweeted: false,
     possibly_sensitive: true,
     lang: 'en' } }

When spacebro receive the event it crashes with this message:

TypeError: Cannot read property 'length' of null
    at Object.exports.strWidth (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/unicode.js:393:26)
    at ScrollableBox.Element.strWidth (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/widgets/element.js:2546:15)
    at /home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/widgets/table.js:71:23
    at Array.forEach (native)
    at /home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/widgets/table.js:70:9
    at Array.forEach (native)
    at ScrollableBox.Table._calculateMaxes (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/widgets/table.js:69:13)
    at ScrollableBox.Table.setRows.Table.setData (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/node_modules/blessed/lib/widgets/table.js:117:8)
    at Object.setInfos (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/dist/dashboard.js:173:16)
    at observeEvent (/home/mina/.nvm/versions/node/v6.9.2/lib/node_modules/spacebro/dist/index.js:70:23)

It doesn't crash if spacebro if run with no dashboard spacebro -H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant