Not sure why context.params from SSR returns sw.js
Unanswered
Whimbrel posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
Do you know why getServerSideProps returns sw.js from context.params?
![Image](https://cdn.discordapp.com/attachments/1173641573238575184/1173641573406355476/image.png?ex=6564b1e4&is=65523ce4&hm=9634257a8bb949d217282edfbca54f98a601258251558e420837525fb23eae43&)
24 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
As a workaround I did this:
if (slug === "sw.js") {
return { props: {} }; // Return empty props or handle as needed
}
![Image](https://cdn.discordapp.com/attachments/1173641573238575184/1173645876263141469/image.png?ex=6564b5e6&is=655240e6&hm=7bc285dde51653c8cf66b69864d1f5688eb4062b298d9b84c99cc8d2533ba615&)
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
Hi @Ray hope you're doing well.
Do you have the same problem? Seems like this is a common issue..
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
nope
have you tried other browser?
or try start the server with different port
PORT=4000 npm run dev
PORT=4000 npm run dev
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
probably you have server worker registered with other app with same url. check your dev tool
![Image](https://cdn.discordapp.com/attachments/1173641573238575184/1173681795741536286/image.png?ex=6564d75a&is=6552625a&hm=3bcfc6f69e5c1004120de2f1107a74fd2e53f0fa3e78ab24f3d2937f7ce8db36&)
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
I've tried also other browser, same issue:
![Image](https://cdn.discordapp.com/attachments/1173641573238575184/1173683189525516348/image.png?ex=6564d8a6&is=655263a6&hm=4e3d1090c806984748bf9fa408b99cbb2b85f736ea2fcde3804213505f584581&)
I've tried Firefox + Chrome.
with npm run build && npm run start
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
have you checked here?
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
hmm, with port:4000 seems to not happen anymore.
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
look like this is the reason
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
![Image](https://cdn.discordapp.com/attachments/1173641573238575184/1173683902930489424/image.png?ex=6564d950&is=65526450&hm=aeb235028c818663b1e4ff1808db56505d0762525805f4d938e8da70675497ef&)
This service worker helps the browser to serve the page faster and cache the content?
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
unregister it
only if you have implemented service worker for your app
like pwa
or you can just ignore the error
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
WhimbrelOP
aa, yea, I've installed pwa on other app, probably that's why I found that sw.js.
Thank you very much :). Now I know what to do.
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
np