ShaneTracey7 / tweeter

0 stars 0 forks source link

weird activity within profile page #78

Open ShaneTracey7 opened 1 week ago

ShaneTracey7 commented 1 week ago

-after clicking follow/unfollow button, tabs (main content) displays inaccurate data -upon going from following/followers view back to profile, tabs (main content) displays inaccurate data (for Profile and otherProfile)

ShaneTracey7 commented 1 week ago

found documentation: https://stackoverflow.com/questions/71978152/how-can-i-fix-this-specific-ng0100-expressionchangedafterithasbeencheckederror

"First detection cycle evaluated the ngIf to false, then ngAfterViewInit was executed, then after it the second verifying detection cycle (angular development mode has this additional one) was executed and this time ngIf was evaluated to true. Hence the infamous error."

Error happens during the following cases: -anytime I view an 'OtherProfile' profile (profile of any user that isn't the user currently logged in) -anytime I hit the 'back' arrow from follower/following view, of any user(Profile or OtherProfile)

Specific Error: Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'OtherProfile'. Current value: 'Profile'. Expression location: _ProfilePageComponent component. Find more at https://angular.io/errors/NG0100 — chunk-TMUGLGNE.js:3354

ShaneTracey7 commented 1 week ago

Weird activity was caused by not resetting arrs from [followers,following] back to [posts,likes,retweets,media] inside the goBack function in profilepagecomponent (it is now fixed)

ShaneTracey7 commented 1 week ago

-error seems to be only affecting secondary content component of profile page componenet -i feel like it must be a different instance of the service. CORRECTION: constructor from core component (that was being extended to most major components, was setting 'this.service.page'

ShaneTracey7 commented 1 week ago

Another error: WebSocket connection to 'ws://localhost:4200/' failed: WebSocket is closed due to suspension.

ShaneTracey7 commented 1 week ago

-happening inside of ProfileFollow

Specific Error: Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'followers'. Current value: 'folllowing'. Expression location: _ProfilePageComponent component. Find more at https://angular.io/errors/NG0100 — chunk-TMUGLGNE.js:3354