steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Mapping WID to GUID no longer works #335

Closed steve8x8 closed 8 years ago

steve8x8 commented 8 years ago

Unknown WIDs (GC cache IDs) can no longer be mapped to GUIDs which are required to access the print page, both mapping methods fail:

 ***  Could not map(1) GC6XYZ1 to GUID
 ***  Could not map(2) GC6XYZ1 to GUID
 ***  Could not map(1) GC6XYZ1 to GUID
 ***  Could not map(2) GC6XYZ1 to GUID
[   ] ( 1/46) [GC6XYZ1] "cache title" (l) [W:""](del)
.../geotoad/lib/shadowget.rb:92:in `cacheFile': undefined method `split' for nil:NilClass (NoMethodError)
    from .../geotoad/lib/shadowget.rb:125:in `invalidate'
    from .../geotoad/geotoad.rb:746:in `block in fetchGeocaches'
    from .../geotoad/geotoad.rb:681:in `each_key'
    from .../geotoad/geotoad.rb:681:in `fetchGeocaches'
    from .../geotoad/geotoad.rb:1101:in `<main>'

This looks like a weekend spent bugfixing, not geocaching...

steve8x8 commented 8 years ago

Quick and dirty workaround to overcome the crash, but not the issue (this seems to happen for PMO caches only? still investigating):

+++ geotoad.new/lib/shadowget.rb<---->2016-04-23 09:42:38.423856871 +0200
--- geotoad.old/lib/shadowget.rb<---->2015-12-18 13:38:26.000000000 +0100
@@ -122,6 +122,7 @@
   end
.
   def invalidate
+    return if not @url
     filename = cacheFile(@url)
     if File.exist?(filename)
       debug "Invalidating cache at #{filename}"

More to come.

steve8x8 commented 8 years ago

Applied to git, together with another patch that exchanges methods 1 (which fails consistently) and 2 (which works for "visible" caches). Unless you know the WID->GUID mapping PMO caches cannot be accessed by non-PMs anymore. They did a good job this time... (Hints welcome. Someone willing to share mapping.yaml files or excerpts by region?)

A new release is being prepared, may be out be end of April, if I find the time. Use git head, or apply the patch above, in the meantime...

steve8x8 commented 8 years ago

There's a new approach to WID->GUID mapping now - which will be used only if the standard way via the cache details page fails. This should be enough to overcome the problem. Release 3.25.4 planned for May 4.

steve8x8 commented 8 years ago

3.25.4 released more than a month ago, closing.