angular/universal

TypeError: console.time is not a function at XMLHttpRequest.window.XMLHttpRequest.send

ImAbhishekTomar opened this issue · 3 comments

I really don't know why this is happening, but when I try any API request it's showing a blow Strange issue.

Functions

this.loginService.doLogin(this.userData).subscribe({
     next: (data: UserLoginResponse) => {
       this.onLogin(data);
     },
     error: (e) => {
       console.log(e);
       this.onError(e); //ERROR SHOWING HERE
     },
     complete: () => {
       AppLogger.log('Login Complete');
     },
   });

//------------------
doLogin(userData): Observable<UserLoginResponse> {
   return this.http.post(
     AppConstant.API_URL + 'Authenticate',
     JSON.stringify(userData),
     { headers: this.headers }
   );
 }

//------------------
 post(url: string, body: any, options?: any): Observable<any> {
   const observable = this.http.post(url, body, options);
   return observable;
 }

ERROR

'TypeError: console.time is not a function
    at XMLHttpRequest.window.XMLHttpRequest.send [as __zone_symbol__send] (http://192.168.1.8:8100/:511:33)
    at ZoneTask.scheduleTask [as scheduleFn] (http://192.168.1.8:8100/polyfills.js:9913:18)
    at _ZoneDelegate.scheduleTask (http://192.168.1.8:8100/polyfills.js:7653:16)
    at AsyncStackTaggingZoneSpec.onScheduleTask (http://192.168.1.8:8100/vendor.js:68513:21)
    at _ZoneDelegate.scheduleTask (http://192.168.1.8:8100/polyfills.js:7648:43)
    at Object.onScheduleTask (http://192.168.1.8:8100/polyfills.js:7565:61)
    at _ZoneDelegate.scheduleTask (http://192.168.1.8:8100/polyfills.js:7648:43)
    at Zone.scheduleTask (http://192.168.1.8:8100/polyfills.js:7504:35)
    at Zone.scheduleMacroTask (http://192.168.1.8:8100/polyfills.js:7526:19)
    at scheduleMacroTaskWithCurrentZone (http://192.168.1.8:8100/polyfills.js:7943:23)'

Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

Closing since a reproduction was not provided.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.