Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

BUG: Extension Template works in browser but fails within KunKun App - "File not found" Error Displayed #79

Open
jonasrafa opened this issue Oct 26, 2024 · 9 comments · May be fixed by #84

Comments

@jonasrafa
Copy link

jonasrafa commented Oct 26, 2024

Describe the bug
The KunKun extension template functions as expected when tested in a standard web browser; however, it does not work within the KunKun app, where it simply returns a "File not found" error.

To Reproduce
Steps to reproduce the behavior:

  1. Run the command npm init kunkun@latest in the terminal.
  2. Choose the "React Custom UI" option during setup.
  3. After initializing, run pnpm install to install dependencies.
  4. Execute pnpm dev to start the extension.
  5. Launch the KunKun app and observe the error "File not found" displayed instead of the expected extension output.

Expected behavior
The extension should run as intended within the KunKun app, providing the same functionality observed in the browser environment.

Screenshots

2024-10-26.10-50-20.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 23H2 22631.4391

KunKun version

  • Version: 0.1.9-beta.4
@jonasrafa jonasrafa changed the title BUG: Extension Template works in browser but fails within KunKun App - "Not found" Error Displayed BUG: Extension Template works in browser but fails within KunKun App - "File not found" Error Displayed Oct 26, 2024
@HuakunShen
Copy link
Member

Hi, sorry about this. The app is undergoing a big extension loading redesign in v0.1.9, the scaffold package for npm init is outdated. I am going to release a new one.

@HuakunShen HuakunShen assigned HuakunShen and unassigned HuakunShen Oct 26, 2024
@HuakunShen
Copy link
Member

HuakunShen commented Oct 26, 2024

@jonasrafa
There was a bug in v0.1.9-beta.4

Can you update to the latest app https://github.com/kunkunsh/kunkun/releases/tag/Kunkun-v0.1.9-beta.5

And generate extension template again? npm init kunkun@latest

I just experimented with a react extension and a template worker extension, both worked for me.

@jonasrafa
Copy link
Author

Template worker I can't test because this error https://github.com/kunkunsh/kunkun/issues/78#issue-2615866523

With react, the error remains the same.

2024-10-26.15-04-54.mp4

@HuakunShen
Copy link
Member

@jonasrafa To test the dev server, you need to turn on the live load mode.
image

In production the app ships from a static file, so you have to tell the app where to load from.
In the package.json, it's main and devMain

@jonasrafa
Copy link
Author

With this option activated, it works perfectly. Thank you

But with “pnpm build” the screen is completely white.

2024-10-26.15-09-11.mp4

@HuakunShen
Copy link
Member

HuakunShen commented Oct 26, 2024

I see. I suspect this is another incompatibility issue with Windows.
This app was developed on Mac and I haven't had time to thoroughly test it on Windows yet.
I will fix it.

@HuakunShen
Copy link
Member

v0.2 is almost ready, I will make an intro video to the app and demo videos to show how to develop extensions.

@HuakunShen
Copy link
Member

image
Issue found, the index.html is loaded, but the js and css files can't be loaded. However, I could fetch the files with fetch.
Very weird, this never happened on Mac.

@HuakunShen
Copy link
Member

HuakunShen commented Oct 27, 2024

I raised this issue with Tauri tauri-apps/tauri#11505

This problem is critical to this application.

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

Successfully merging a pull request may close this issue.

2 participants