Python serving old main.js and abi.js on port 8000

Hi everyone,

I am dealing with a strange issue when trying to set up my dApp project. When I start the python server on port 8000 it will serve me the previously hosted main.js and abi.js from an old project. The really strange thing also is, that the index.html is the correct one, although all files are of course in the same folder, and I launch the server from inside this folder.

When I host on any other port, all files will be served correctly. So how can this be? And how can I clean port 8000 so it will serve the current files? :thinking:

anyone knows how to fix this? @dan-i, @filip, @thecil

2 Likes

Hey @Bhujanga, hope you are great.

Now you mention that you have 2 projects, an old one and new one right? both inside the same folder, right? maybe an screenshot of your folder can help us find the problem. :face_with_monocle:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Hey @Bhujanga, hope you are great.

Now you mention that you have 2 projects, an old one and new one right? both inside the same folder, right? maybe an screenshot of your folder can help us find the problem. :face_with_monocle:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z

Hey,

the projects are not in the same folder. Sorry if that was not clear. with “in the same folder” I meant that the index.html, main.js, and abi.js of the new project are, of course, in the same folder. The old project files are in their own separate folder, actually quite “far” away, lol.
The strange issue is, that when I run the new dApp on port 8000, index.html is from the new project and all .js files are from the old project. I hope this clarifies the situation.

When I run server on another port, everything works fine. In the above picture you can see, that in the Developer tools Source tab I can see that the dApp is using abi.js and main.js from the old project, although, again, these files are in a complete different folder.

So I suspect that somehow the old project is kinda still on port 8000. Which is kinda strange, as many reboots happened since I worked on the old project. (Which is by the way the people project from filips course.)

Thanks for taking time to look into this.

1 Like

Hi @Bhujanga

This happened to me and to other students as sometimes the python server does not update itself or it does it slowly.
My first suggestion is to try to empty your browser cache, restart the server and retry.
Let us know.

3 Likes

Indeed, 24 hours later python is serving the right files on port 8000. A strange issue, as there have been many restarts between these two projects and one would assume caches to be empty or at least python to be updated. For future readers: in the developer tools Source tab (see picture) you can check which files your localhost is serving. This can be very important information for debugging! DevToolsSourceTab

So I assume this topic to be closed @dan-i & @thecil
Thank you so much :pray:

3 Likes

You are very welcome :slight_smile:

2 Likes