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

App gets stuck on instantiation after switching party #2862

Open
bjosttveit opened this issue Jan 3, 2025 · 0 comments
Open

App gets stuck on instantiation after switching party #2862

bjosttveit opened this issue Jan 3, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@bjosttveit
Copy link
Member

bjosttveit commented Jan 3, 2025

Description of the bug

If you instantiate an app, then go back to party selection and select a different party, you will see an infinite loader with reason='instantiating'. The reason is the following check:

const shouldCreateInstance = !!party && !instantiation.lastResult && !instantiation.isLoading;

This check fails due to instantiation.lastResult being truthy, probably because we already created an instance with a different party before.

It may also be prevented by the implementation of the instantiate function:

if (instantiate.data || instantiate.isPending || instantiate.error || isInstantiatingRef.current) {
  return;
}

Steps To Reproduce

  1. Go to https://ttd.apps.tt02.altinn.no/ttd/frontend-test
  2. Login with a testid with at least two parties
  3. Select 1st party, and create a new instance
  4. Navigate to /#/party-selection and select a different party
  5. See infinite loading screen

Additional Information

No response

@bjosttveit bjosttveit added the kind/bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant