markwal / OctoPrint-PortLister

An OctoPrint plugin that notices when a new serial port appears and refreshes the port list without a page refresh
GNU Affero General Public License v3.0
26 stars 10 forks source link

"New version" bug #3

Closed bolsoncerrado closed 8 years ago

bolsoncerrado commented 8 years ago

It keeps asking you to update the plugin over and over....

gddeen commented 8 years ago

Hmmmmm... I had that problem. Thought it was me. I rebooted. I JUST selected update the plugin and waited. It took awhile.

bolsoncerrado commented 8 years ago

Yeah but every once in a while even if I update it, the "new version" appears once again.

gddeen commented 8 years ago

I'm looking in my logs to see what he did. (I think he lives on the West Coast of USA... Big time diff...) I looked through the code last night to see what was up.

gddeen commented 8 years ago

I found some problems in .octoprint/logs/octoprint.log and plugin_pluginmanager_console.log on my machine.

So I'd suggest collecting those two files and putting them where he can see them... I think they used something like hasten... (I use dropbox...)

gddeen commented 8 years ago

I got this on the update: 016-03-13 22:11:24,707 - octoprint.server.util.sockjs - WARNING - Could not send message to client 192.168.1.7: 'utf8' codec can't decode byte 0x8e in position 39: invalid start byte 2016-03-13 22:12:34,048 - octoprint.plugins.octobullet - INFO - Connected to PushBullet 2016-03-13 22:14:52,500 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk 2016-03-13 22:15:02,748 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.7 2016-03-13 22:21:56,509 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.1.7 2016-03-13 22:21:56,516 - octoprint.server.util.sockjs - WARNING - Could not send message to client 192.168.1.7: 'utf8' codec can't decode byte 0x8e in position 39: invalid start byte 2016-03-13 22:23:29,311 - octoprint.plugins.softwareupdate - INFO - Starting update of portlister to 0.1.4... 2016-03-13 22:24:20,080 - octoprint.plugins.softwareupdate - INFO - Update of portlister to 0.1.4 successful! 2016-03-13 22:24:20,672 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk 2016-03-13 22:24:20,677 - octoprint.plugins.softwareupdate - INFO - Restarting... 2016-03-13 22:24:58,872 - octoprint.server - INFO - Starting OctoPrint 1.2.9 (master branch)

gddeen commented 8 years ago

I had set the cache timeout from 14400 minutes to 60... So it took the update

gddeen commented 8 years ago

For me, it starts the update for PortLister, then restarts octoprint server. Portlister is at old release. I assume it will wait some cache timeout and then do it again.

markwal commented 8 years ago

I did it again. Internal version mismatch. Sorry guys.

gddeen commented 8 years ago

You kidding me??? This was fun. I found 2 problems in Octoprint I have to go fix... etc.

gddeen commented 8 years ago

At this rate. You will become the MOST popular plugin. Everyone always goes and gets the newest version. Thousands of people go get it.

Only 1 knows what it really does??? (I'm guessing maybe 1 less reload/refresh/'connect'.)

markwal commented 8 years ago

Should be fixed now. Unfortunately, it'll take two updates to resolve. One to get you to 0.1.4 (which is still broken) and then it'll offer you 0.1.5 which should then leave you alone.

Sorry again.

gddeen commented 8 years ago

Thanks. Did you just bump the version # in the file? I’m looking at all the plugins and how they update, etc… So, this saves me having to test this myself…

I now have 3 octoprints up and running. C/C++ not too big a deal… Python in user space?… whew boy. 1 line and a few trillion instructions later…

On Mar 14, 2016, at 11:38 AM, Mark Walker notifications@github.com wrote:

Should be fixed now. Unfortunately, it'll take two updates to resolve. One to get you to 0.1.4 (which is still broken) and then it'll offer you 0.1.5 which should then leave you alone.

Sorry again.

— Reply to this email directly or view it on GitHub https://github.com/markwal/OctoPrint-PortLister/issues/3#issuecomment-196372028.

markwal commented 8 years ago

Yes, setup.py in the plugin has a version number which is what OctoPrint asks "what version do you have?" And github tags/releases has a version number which OctoPrint asks "what version is available?" If they don't match, boom, infinite updates.

gddeen commented 8 years ago

No sir… It DID go from 0.1.3 (Actually 0.1.4 a few times already…) straight to 0.1.5…

Which is tough… So you can’t depend upon data being clean, or at the previous level… It can be a mixture of every version…

Which tells me… Better write good code.

On Mar 14, 2016, at 11:38 AM, Mark Walker notifications@github.com wrote:

Should be fixed now. Unfortunately, it'll take two updates to resolve. One to get you to 0.1.4 (which is still broken) and then it'll offer you 0.1.5 which should then leave you alone.

Sorry again.

— Reply to this email directly or view it on GitHub https://github.com/markwal/OctoPrint-PortLister/issues/3#issuecomment-196372028.

markwal commented 8 years ago

Yeah. I knew it could do that. Some folks will have to do two hops if the cache still only has 0.1.4 discovered. It has a timer on how often it bothers GitHub as you mentioned earlier.