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

Bug: In some random cases errors appear IServiceProvider Disposed #3387

Closed
iJungleboy opened this issue May 16, 2024 · 1 comment
Closed
Assignees

Comments

@iJungleboy
Copy link
Contributor

I'm submitting a

[x] bug report => search github for a similar issue before submitting

...about

[x] Content Types or data management
[x] internals

Current Behavior / Expected Behavior

In fairly random scenarios, errors appear in the style of Cannot Access Disposed object Object name: IServiceProvider.

image

After extensive research it appears that this is because of Ghost content types accessing metadata of their parent app, and some changes in the API around AppState resulted in using Dependency Injection much later, after the initial setup had been completed and it had been disposed.

Should be fixed now.

Instructions to Reproduce the Problem

  1. Find an app which has Ghost content types
  2. open the app admin - data tab and go somewhere with ghost-items - could be a special scope
  3. in another tab, log out
  4. restart the application (leave the app-data tab open)
  5. reload app-data so you get a not-authorized error. This somehow only loads part of the data, so that further loading will be delayed.
  6. Now log on again in the other tab
  7. then refresh the app-data. This will then try to load the remaining data "lazy" and fail.

Your environment

  • 2sxc version(s): 17.07
@iJungleboy iJungleboy self-assigned this May 16, 2024
iJungleboy added a commit to 2sic/eav-server that referenced this issue May 16, 2024
iJungleboy added a commit that referenced this issue May 16, 2024
@iJungleboy iJungleboy reopened this May 22, 2024
@iJungleboy
Copy link
Contributor Author

it appears the problem was different.

Apparently it was because IView objects were being cached once created, but they kept a lazy-service which stopped working after the initial IServiceProvider was disposed after filling the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: v17.10
Development

No branches or pull requests

1 participant