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

Fixes related to using browser back to starting point #4288

Merged
merged 6 commits into from
May 22, 2020
Merged

Conversation

richard-cox
Copy link
Contributor

@richard-cox richard-cox commented May 12, 2020

To Reproduce

  • refresh on service marketplace, must be over 100 services (see IBM's CF)
  • if the browser back button is enabled, use it. if not nav to a service and then hit back twice
  • two exceptions should show
ERROR Error: SidePanelService: container already set
    at SidePanelService.setContainer (side-panel.service.ts:40)
    at DashboardBaseComponent.ngAfterViewInit (dashboard-base.component.ts:135)
entity-request-pipeline.ts:94 TypeError: Cannot assign to read only property 'cfGuid' of object '[object Object]'
    at globalSuccessfulRequestDataMapper (cf-entity-generator.ts:173)
    at map-multi-endpoint.pipes.ts:37

… to & return from login

- hit browser back button until login screen temporarily hit
- ERROR Error: SidePanelService: container already set thrown
- This was due to DashboardBaseComponent initialising the side panel twice, once per nav from login pages
- fix is to ensure the panel service only lives in the DashboardBaseComponent rather than whole app
- nav to marketplace. marketplace should contain over 100 services
- hit browser back to temporarily go to login page and back
- non-first pages were refetched, with one causing a 'write to protected obj' error
```
entity-request-pipeline.ts:94 TypeError: Cannot assign to read only property 'cfGuid' of object '[object Object]'
    at globalSuccessfulRequestDataMapper (cf-entity-generator.ts:173)
    at map-multi-endpoint.pipes.ts:37
    at Array.reduce (<anonymous>)
    at map-multi-endpoint.pipes.ts:35
    at Array.reduce (<anonymous>)
    at getEntities (map-multi-endpoint.pipes.ts:31)
    at map-multi-endpoint.pipes.ts:102
    at Array.map (<anonymous>)
    at mapMultiEndpointResponses (map-multi-endpoint.pipes.ts:101)
    at MapSubscriber.project (entity-pagination-request-pipeline.ts:134)
```
Copy link
Contributor

@nwmac nwmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nwmac nwmac merged commit d9fb11f into master May 22, 2020
@nwmac nwmac deleted the browser-back-fixes branch May 22, 2020 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exceptions thrown when navigating back from marketplace
2 participants