lokers / ng4-twitter-timeline

MIT License
6 stars 5 forks source link

zone.js:654 Unhandled Promise rejection: Network error. #2

Open deepanigi opened 7 years ago

deepanigi commented 7 years ago

I am having a dashboard module for which i have added.

import { NgModule } from '@angular/core';
import { AngularEchartsModule } from 'ngx-echarts';
import { ThemeModule } from '../../@theme/theme.module';
import { DashboardComponent } from './dashboard.component';
import { Ng4TwitterTimelineModule } from 'ng4-twitter-timeline/lib/index';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
  imports: [
    ThemeModule,
    AngularEchartsModule,
    Ng4TwitterTimelineModule,
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  declarations: [
    DashboardComponent,

   ],
})
export class DashboardModule {
  constructor(private ng4TwitterTimelineModule: Ng4TwitterTimelineModule) {

  }

}

In dashboard html file

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<div class="row">
  <div class="col-xxxl-3 col-md-6">
    <ng4-twitter-timeline [dataSrc]="{sourceType: 'url',url: 'https://twitter.com/search?q=%23auto%20OR%20%23bike'}" [opts]="{tweetLimit: 2}"></ng4-twitter-timeline>

    <a class="twitter-timeline"
      href="https://twitter.com/search?q=%23auto%20OR%20%23bike"
      data-widget-id="1923533666432815105"
      data-height="455"
      data-chrome="nofooter"
      data-link-color="#5ec318"
      data-border-color="#16d73a">
    Tweets
    </a>

  </div>
  </div>

in your steps you have not mentioned anyone these but if i remove the twitter widget is not displayed

<a class="twitter-timeline"
      href="https://twitter.com/search?q=%23auto%20OR%20%23bike"
      data-widget-id="1923533666432815105"
      data-height="455"
      data-chrome="nofooter"
      data-link-color="#5ec318"
      data-border-color="#16d73a">
    Tweets
    </a>

when run the application i am able to see the twitter timeline but for each tweet update i am getting lots of this same error in console.

zone.js:654 Unhandled Promise rejection: Network error. ; Zone: <root> ; Task: Promise.then ; Value: Error: Network error.
    at Object.<anonymous> (widgets.js:9)
    at e (widgets.js:1)
    at Object.<anonymous> (widgets.js:9)
    at e (widgets.js:1)
    at Object.<anonymous> (widgets.js:9)
    at e (widgets.js:1)
    at Object.Function.bind.test.window.__twttr.window.__twttr.widgets.window.__twttr.widgets.init.t.exports (widgets.js:9)
    at e (widgets.js:1)
    at Object.<anonymous> (widgets.js:8)
    at e (widgets.js:1) Error: Network error.
    at Object.<anonymous> (http://platform.twitter.com/widgets.js:9:20832)
    at e (http://platform.twitter.com/widgets.js:1:411)
    at Object.<anonymous> (http://platform.twitter.com/widgets.js:9:18687)
    at e (http://platform.twitter.com/widgets.js:1:411)
    at Object.<anonymous> (http://platform.twitter.com/widgets.js:9:18543)
    at e (http://platform.twitter.com/widgets.js:1:411)
    at Object.Function.bind.test.window.__twttr.window.__twttr.widgets.window.__twttr.widgets.init.t.exports (http://platform.twitter.com/widgets.js:9:2819)
    at e (http://platform.twitter.com/widgets.js:1:411)
    at Object.<anonymous> (http://platform.twitter.com/widgets.js:8:26653)
    at e (http://platform.twitter.com/widgets.js:1:411)

also sometime when i deploy the application i face this issue too.

https://github.com/lokers/ng4-twitter-timeline/issues/1

I would like to see this fixed because your twitter timeline module is so perfect .

jfchatelain commented 7 years ago

Same for me any ideas on this? Thanks