apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.87k stars 223 forks source link

InvalidPathException after refreshing backend pages #589

Open SimoLongobardi opened 2 weeks ago

SimoLongobardi commented 2 weeks ago

Hi, i'm currently using 5.1.5 and i'm having an issue with page refresh on the backend. Every time a page different from the dashboard (path https://domain.com/public/apps/fusio) is refreshed an PSX\Framework\Loader\InvalidPathException is thrown. No error is given with normal navigation but if page get refreshed the only way to make it work agaih is to go back to the dashboard. The problem also shows after the logout. Since this is a fresh installation i've tried to re-install fusio from scratch but nothing changed.

More error info: Messagge: Unknown location in /home/silonweb/endpoint/kamehub/vendor/psx/framework/src/Loader/Loader.php on line 74 Trace: #0 .../vendor/psx/framework/src/Dispatch/Dispatch.php(86): PSX\\Framework\\Loader\\Loader->load()\n#1 .../vendor/psx/engine/src/WebServer/Engine.php(51): PSX\\Framework\\Dispatch\\Dispatch->route()\n#2 .../vendor/psx/framework/src/Environment/Environment.php(49): PSX\\Engine\\WebServer\\Engine->serve()\n#3 .../public/index.php(29): PSX\\Framework\\Environment\\Environment->serve()\n#4 {main} Context: 70 $this-&gt;eventDispatcher-&gt;dispatch(new RouteMatchedEvent($result, $context));\n71 \n72 $this-&gt;execute($context-&gt;getSource(), $result, $response, $context);\n73 } else {\n<b>74 throw new InvalidPathException(&#039;Unknown location&#039;, $request);\n</b>75 }\n76 }\n77 \n78 public function execute(mixed $source, RequestInterface $request, ResponseInterface $response, Context $context): void\n

chriskapp commented 2 weeks ago

Hi @SimoLongobardi,

this is very likely a problem regarding your web-server, since it redirects the request to Fusio and not the index.html, its important to exclude rewrites from the apps/ folder s. https://github.com/apioo/fusio/blob/master/public/.htaccess#L2

If you use Nginx you can also take a look at our documentation s. https://docs.fusio-project.org/docs/installation/nginx