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

Error Starting Blazor #47

Closed
roend83 opened this issue Oct 12, 2021 · 5 comments
Closed

Error Starting Blazor #47

roend83 opened this issue Oct 12, 2021 · 5 comments

Comments

@roend83
Copy link

roend83 commented Oct 12, 2021

I followed the instructions for setting up a Piral shell and a Blazor Pilet from the template and I'm getting the following error when debugging the Blazor app:

Uncaught RuntimeError: memory access out of boundsUncaught RangeError: Invalid typed array length: 534384Uncaught Error: Failed to start platform. Reason: RangeError: Invalid typed array length: 43920The thread 0x3a84 has exited with code 0 (0x0).

Any idea what I'm doing wrong?

@FlorianRappl
Copy link
Collaborator

Hm nope - can you provide a MWE to reproduce the issue? What platform (Windows / Linux / Mac) are you using?

@roend83
Copy link
Author

roend83 commented Oct 12, 2021

I'm on windows. I tried zipping up my project but it was too big. I didn't publish my shell to the public NPM feed so I can't just share the blazor app.

I used the piral-cli to create a new shell app and added these dependencies:

  "dependencies": {
    "blazor": "^5.0.0-pre.20210622.1",
    "piral": "^0.13.9",
    "piral-blazor": "^0.14.0-pre.3099"
  }

and added the plugin to index.tsx

renderInstance({
  plugins: [
    createBlazorApi()
  ],
  layout,
  errors,
  requestPilets() {
    return fetch(feedUrl)
      .then(res => res.json())
      .then(res => res.items);
  },
});

and then published it to a private NPM feed.

After that I used version 5.0.0-pre.20210622.1 of Piral.Blazor.Template to scaffold a Blazor app. I pointed it at my private NPM feed and my shell package and built and ran the app. I get this error when I navigate to /counter.

@FlorianRappl
Copy link
Collaborator

I tried zipping up my project but it was too big.

Please don't use ZIP. Use a GitHub repository. And please don't add binaries etc. -> standard gitignore rules should apply (so avoid adding dependencies which are anyway resolved via NPM / NuGet / whatever package manager).

Regarding the steps; thanks for providing these - but those are pretty standard steps. They are too generic to help resolving your issue.

There is no need to share your specific project. A MWE is by definition something small and does not require business context. Just try to reproduce your issue in a clean project and share that one once you are successful. Thanks!

@roend83
Copy link
Author

roend83 commented Oct 12, 2021

https://github.com/roend83/Piral.Blazor.MWE

There's not a lot to this. Just followed the steps I outlined above.

@FlorianRappl
Copy link
Collaborator

I just tested this. It works on my side. Notable changes / my configuration:

  • SDK was 5.0.404 (originally 5.0.401)
  • Updated all parts to latest version (e.g., piral, piral-cli, etc. in 14.0.6) and aligned versions (previously was piral-blazor in 0.14-preview, but piral in 0.13.9)
  • Did not use "localhost" for npm registry, but just the local path (I've built the app shell upfront)

Did not test with the usual configuration as I'm not sure what you took as registry and why you mixed versions (plus, I did not want to install an oudated version of the .NET SDK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants