AutoUpdate - Update your plugins!

Discussion in 'Resources' started by V10lator, Jul 3, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    md_5

    I don't actually know the exact circumstances here, but if the issue is Bukget turning malicious and redirecting download links why don't you make the plugin access BukkitDev directly?
     
  2. md_5 cause bukget == BukkitDev? If you want to know more please read from page 1, there's some info from the beginning of AutoUpdate.
    Anyway: The current dev version doesn't use a caching server anymore and h31ix replied at the conversation, so hopefully I can release it soon. :)
     
  3. Offline

    md_5

    bukget != BukkitDev. This whole thread is clouded with misinformation, but as I see it they key issue here is you are NOT downloading straight from dev.bukkit.org. This leads to the (small) potential for malicious, unapproved downloads to take place.
     
  4. *confused*

    Okay guys: All cleared, v1.2 released! :)

    But some info:
    • It does not use the caching server anymore.
    • bukgets API v2 parses your jar files, that means the versions info is taken directly from the plugin.yml - No need for some prefixes/suffixes anymore.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  5. Offline

    Deleted user

    So... this is plug and play right?
    Just stick the class in, and put new AutoUpdate(this) into the onEnable()?
     
  6. This is the lazy way, yes. But you may get trouble if the bukkitdev slug != plugin.getName().toLowerCase() or you use another config than the default one. All in all it can't be bad to have a look at the 6 configurable variables (3 of them are chat colors) and have a look at the JavaDocs (if you ignore everything which says "This is internal stuff" you end up with 5 little methods).
     
  7. Offline

    Casier

    Love it so much !! Thanks !! It's too easy... I love you !
     
  8. v1.3 makes the command usable from the console! Even if this is a really hackish solution which screws up the JavaDocs.
     
  9. Offline

    xeno44

    Hello
    I m error in log
    Code:
    [RideThaDragon] WARNING: Couldn't save!
    12:40:10 [SEVERE] java.io.FileNotFoundException: plugins/RideThaDragon/dragons.sav (Too many open files)
    12:40:10 [SEVERE]      at java.io.FileOutputStream.open(Native Method)
    12:40:10 [SEVERE]      at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
    12:40:10 [SEVERE]      at java.io.FileOutputStream.<init>(FileOutputStream.java:165)
    12:40:10 [SEVERE]      at java.io.FileWriter.<init>(FileWriter.java:90)
    12:40:10 [SEVERE]      at org.bukkit.configuration.file.FileConfiguration.save(FileConfiguration.java:56)
    12:40:10 [SEVERE]      at de.V10lator.RideThaDragon.RideThaDragon.saveAll(RideThaDragon.java:377)
    12:40:10 [SEVERE]      at de.V10lator.RideThaDragon.RideThaDragon.access$0(RideThaDragon.java:326)
    12:40:10 [SEVERE]      at de.V10lator.RideThaDragon.RideThaDragon$AutoSave.run(RideThaDragon.java:309)
    12:40:10 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:52)
    12:40:10 [SEVERE]      at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:321)
    12:40:10 [SEVERE]      at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:509)
    12:40:10 [SEVERE]      at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213)
    12:40:10 [SEVERE]      at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:473)
    12:40:10 [SEVERE]      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:405)
    12:40:10 [SEVERE]      at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    12:40:11 [SEVERE] java.lang.NullPointerException
    12:40:11 [SEVERE]      at net.minecraft.server.WorldNBTStorage.getSeenPlayers(WorldNBTStorage.java:227)
    12:40:11 [SEVERE]      at net.minecraft.server.ServerConfigurationManagerAbstract.getSeenPlayers(ServerConfigurationManagerAbstract.java:686)
    12:40:11 [SEVERE]      at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1010)
    12:40:11 [SEVERE]      at net.minecraft.server.DedicatedServer.a(DedicatedServer.java:228)
    12:40:11 [SEVERE]      at net.minecraft.server.MojangStatisticsGenerator.b(SourceFile:91)
    12:40:11 [SEVERE]      at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:498)
    12:40:11 [SEVERE]      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:405)
    12:40:11 [SEVERE]      at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    12:40:11 [SEVERE] Encountered an unexpected exception NullPointerException
    
     
  10. xeno44 This is not a thread about RideThaDragon. Also the error "Too many open files" tells that there's something other wrong. Either minecraft itself or another plugin doesn't close it's files like it should.
     
  11. Offline

    superpeanut911

    According to the bukkitdev approval proccess, It needs to have an "opt-out" feature to disable checks for updates. Is that implemented? If it is, mind showing me how it works? :p I have added this to one of my plugins and the file got rapidly denied for not having the opt-out.
     
  12. superpeanut911 It has, simply set AutoUpdate to false in your plugins config. After the first run this config entry will exist.

    h31ix ? :(
     
  13. Offline

    Gravity

    That quote wasn't even about this, it was about the use of bukget...
     
  14. h31ix But only staff can reject the plugin... :p

    //EDIT: See:
     
  15. Offline

    superpeanut911

  16. This can only be a joke. obnoxint knows about AutoUpdate... I even had a large conversation with him and other staff members about it some time ago... :mad:
     
  17. Offline

    superpeanut911

    Should I just re-submit for approval..?
     
  18. Maybe I shouldn't say that but as obnoxint is marked as away at IRC and offline at Skype: Do it. :p
    But you have to re-pack the jar as it needs a new md5 sum (else you can't upload it as the same file was uploaded before).

    And at the bukkitdev staff: I start to get the feeling you want to harm AutoUpdate (maybe in flavour of another update method some of the staff members wrote?). If that's the case just tell me. I don't want to waste my time maintaining this if all I get from it is anger with you guys and other devs that want to use it.

    //EDIT: And before I forget, obnoxint , what do you think this is for:
    Code:java
    1. private boolean checkState(boolean newState, boolean restart)
    2. {
    3. if(enabled != newState)
    4. {
    5. enabled = newState;
    6. plugin.getLogger().info("[AutoUpdate] v"+version+(enabled ? " enabled" : " disabled")+"!");
    7. if(restart)
    8. return restartMainTask();
    9. }
    10. return enabled;
    11. }

    and why it's called at setConfig2(Configuration config), which is called from setConfig(Configuration config), which is called from the constructor of the class? Hint: It may have something to do with opting-out the update function (if the task never gets started, how can it do anything?).
     
  19. Offline

    superpeanut911

    Alright, I already re-packed it with a small bug fix :p
     
  20. Offline

    Gravity

    Go ahead and send obnoxint a forum/dbo message and resubmit.
    Oh, please, come off it. I understand how you could be frustrated but blaming us for that is pretty insulting after all the work we do to keep BukkitDev fair and safe. I think it's clear that I've tried to do all I can to make sure staff know your system is fine to use, and to try and pin us as trying to use our power to ruin your system is ridiculous. I and the others will continue to try and make this right, but at least be mature about it.
     
  21. Offline

    superpeanut911

    Maybe obnoxint didn't know what auto updater I was using? I didn't exactly specify it was this one, Now I did put a link to this thread on my post
     
  22. h31ix Sorry for raging, but this isn't the first time this happened and obnoxint knows about AutoUpdate. Remember the conversation named
    "V10lift - v0.4.12 has been rejected" we had with him and others one month ago?
    Sometimes I wonder if staff even checks the file before rejecting it. I mean the code I posted above is just one of the methods that makes sure AutoUpdate don't run if it shouldn't (in fact it makes sure that it don't run from the beginning if the config value is false). Another one, that you have to follow more to understand it is this one (it makes sure it can be disabled at runtime):
    Code:java
    1. public boolean restartMainTask()
    2. {
    3. try
    4. {
    5. ResetTask rt = new ResetTask(enabled);
    6. rt.setPid(plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, rt, 0L, 1L));
    7. return enabled;
    8. }
    9. catch(Throwable t)
    10. {
    11. printStackTraceSync(t, false);
    12. return false;
    13. }
    14. }

    As you see it gives the global variable enabled to the ResetTask. The ResetTask saves it at the variable restart internally and does this with it:
    Code:java
    1. if(bs.isQueued(AutoUpdate.this.pid) || bs.isCurrentlyRunning(AutoUpdate.this.pid))
    2. bs.cancelTask(AutoUpdate.this.pid);
    3. if(restart)
    4. AutoUpdate.this.pid = bs.scheduleAsyncRepeatingTask(plugin, AutoUpdate.this, 5L, delay);

    But really, it's late here (2:30 am) so forgive me my raging and let's hope obnoxint is able to explain what happened. ^^
     
  23. Offline

    Gravity

    I think I'm done with this conversation, sorry.
     
  24. h31ix I know it sounds more rude than it should, but the two points are still valid:
    1) obnoxint knows AutoUpdate.
    2) Even if he wouldn't he should see that it's possible to disable it by reading the (decompiled) sources.
    Are my feelings really that inexplicable?
     
  25. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    V10lator
    You accuse us of bias and wanting to harm this auto updater, and then claim we don't even check files before rejecting them. If you want to make such bullshit allegations you can make them elsewhere. This thread is turning from a resource post into a string of nonsense, and if it continues down that path I'll lock it just like other useless threads that have run their course.
     
  26. Offline

    obnoxint

    Seriously?
    [​IMG]
     
  27. Offline

    SteveMcGrath


    As the BukGet developer I wanted to throw my 2 cents in on the whole Curse ToS issue. BukGet will send a request to dev.bukkit.org once every 2 seconds. This easily complies within the ToS as I read it. All other communications between the API and BukGet are being sent only to the API, and not to DBO. Further BukGet links back into DBO for file downloads so there should be no issue. Correct me if I'm wrong, however I have yet to see any notification from Curse or the Bukkit team on the matter, and we are trending north of 2 million API calls a month currently. So I think this is a bit of a non-issue.

    We are looking into a reliable way to handle zip files at the moment. The problem that I have been running into is that Zip files can follow any formatting standard inside the container that the dev wants, making it really difficult to pull the information.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  28. SteveMcGrath Nice to see you here. :)

    As far as I see your API is fully supported by bukkit (they are against me caching your API but not against using it, for example. Also till now I thought you where a part of curse or bukkit as replies from bukkit staff sounded like this is the official bukkitdev API. I really wonder now...).

    Also nice to hear that you plan to implement a way to get the jar out of the zip, so I don't have to handle it in the class that is still so big cause of all the performance and command magic.
     
  29. Offline

    Gravity

    I think zip files should just be outlawed upright on DBO. Of course, I'm not going to do anything about it because that would cause us and developers unnecessary pain, but zip files slow the approval process down for everyone so much more. On the scale of plugins that we receive, throwing an archive file that we then have to jump out of our repetitive and quick process of downloading and decompiling to go unzip and explore really throws everything off. That's not helped by the fact that a lot of people who upload zips upload them completely unnecessarily; they will use them to have a plugin folder which could be generated and populated by code, or sometimes even upload an archive with just a jar in it. Both of these things slow approval down by possibly.. say 10 minutes for every 30 files. That's a lot of time.

    Also V10lator it's not official, we just have decided that it's secure enough for people to use until proven otherwise.
     
  30. Offline

    SteveMcGrath

    h31ix I agree. Zip files add too much ambiguity and make it a pain for me to process, hence why they havent been supported so far. Also I do have to agree that caching the API is not only pointless in a lot of respects, but actually can add to further breakage.

    @V10lator the BukGet API is updated every 6 hours with new content. Furthermore if you want a feature into the API that is currently not in there, just open a ticket on the github page. It may take me a while as I'm currently the only developer on the project and I do have a day job that can be demanding, however I will at least respond back and maybe add it into my task list for BukGet. As it sits right now, I'm knee-deep in testing new methodologies for the API to help cope with the explosive growth.

    Regardless to all of this. Thanks guys (both to h31ix & the BukkitDev staff for putting up with my shenanigans, and to people like @V10later who code into the API and make it useful)
     
    V10lator and h31ix like this.
Thread Status:
Not open for further replies.

Share This Page