IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
284 stars 110 forks source link

Plugin read/update issues #210

Closed angel93ayora closed 4 years ago

angel93ayora commented 5 years ago

I've enconteured two problems:

  1. Read issue. When in-script key-value headers are separated with tabs (instead of spaces) the app will crash and will not be able to start properly until the plugin is deleted or tabs are replaced with spaces. This happened to me when i've updated a plugin with tabs and encountered that iitcm was crashing :/

  2. Update issue. When plugin-name.meta.js file exists and is readable, and a request to plugin-name.user.js returns almost anything the file placed on plugins folder will be replaced with that response. That response could be a 404 html, or something. Possible solutions: -- Check content-type http header -- Check for in-script version / id headers

johnd0e commented 5 years ago
  1. Perhaps it is function of this code: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/mobile/app/src/main/java/org/exarhteam/iitc_mobile/IITC_FileManager.java#L107-L120
johnd0e commented 5 years ago
  1. It's here: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/mobile/app/src/main/java/org/exarhteam/iitc_mobile/async/UpdateScript.java#L66-L76
johnd0e commented 5 years ago

@angel93ayora Please check test build

johnd0e commented 5 years ago

-- Check for in-script version / id headers

Most proper way: