Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fork of platform-api having problems #35

Closed
jrochkind opened this issue Feb 17, 2017 · 17 comments
Closed

fork of platform-api having problems #35

jrochkind opened this issue Feb 17, 2017 · 17 comments

Comments

@jrochkind
Copy link

Is it still needed? Cause for some reason it's not working.

ruby 2.3.1, bundler 1.14.1, with gem 'platform-api', git: 'https://github.com/jalada/platform-api', branch: 'master' in Gemfile it bundles fine, but trying to run the app it fails when required:

Bundler::GemRequireError: There was an error while trying to load the gem 'platform-api'.
Gem Load Error is: Name 'Create (Deprecated)' converts to invalid Ruby name 'create_(deprecated)'.
Backtrace for gem load error is:
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/naming.rb:17:in `ruby_name'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:64:in `block in initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each_with_index'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `map'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:14:in `new'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:14:in `block in initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:13:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:13:in `initialize'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:2482:in `new'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:2482:in `<module:PlatformAPI>'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:13:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api.rb:7:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api.rb:7:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `block in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler.rb:107:in `require'
/Users/jrochkind/code/rubyland/config/application.rb:7:in `<top (required)>'
/Users/jrochkind/code/rubyland/Rakefile:4:in `require_relative'
/Users/jrochkind/code/rubyland/Rakefile:4:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/bin/rake:23:in `load'
/Users/jrochkind/.gem/ruby/2.3.1/bin/rake:23:in `<main>'
Bundler Error Backtrace:
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `block in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler.rb:107:in `require'
/Users/jrochkind/code/rubyland/config/application.rb:7:in `<top (required)>'
/Users/jrochkind/code/rubyland/Rakefile:4:in `require_relative'
/Users/jrochkind/code/rubyland/Rakefile:4:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Heroics::SchemaError: Name 'Create (Deprecated)' converts to invalid Ruby name 'create_(deprecated)'.
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/naming.rb:17:in `ruby_name'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:64:in `block in initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each_with_index'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `map'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:63:in `initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:14:in `new'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:14:in `block in initialize'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:13:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/heroics-0.0.19/lib/heroics/schema.rb:13:in `initialize'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:2482:in `new'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:2482:in `<module:PlatformAPI>'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api/client.rb:13:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api.rb:7:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/bundler/gems/platform-api-45ddb3c1a7e2/lib/platform-api.rb:7:in `<top (required)>'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `block in require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `each'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `require'
/Users/jrochkind/.gem/ruby/2.3.1/gems/bundler-1.14.4/lib/bundler.rb:107:in `require'
/Users/jrochkind/code/rubyland/config/application.rb:7:in `<top (required)>'
@jrochkind
Copy link
Author

upgrading to bundler 1.14.4 made no difference. Downgrading to 1.13.7 still reproduces too. If it's not bundler version... I don't know what's going on, I have used this sucesfully in the past.

@jrochkind
Copy link
Author

I see you just released 1.0.0 today. Downgrading to letsencrypt-rails-heroku 0.3.0 does not fix problem.

I may have to downgrade to an older version of git https://github.com/jalada/platform-api, since I know it used to work... that's a pain to do for obvious reasons, this is why we do and use actual gem releases. :)

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

@jrochkind hmm this is puzzling. A couple of things:

  1. I haven't changed jalada/platform-api for ages, as you can tell from the history. So I don't think it's anything changing there that is causing your problem...

  2. Please can you nudge Heroku, upstream, to get them to update their gem to support the SNI SSL endpoints. I would much rather tell people to use a proper gem release 😞 See Access to sni-endpoints API heroku/platform-api#49 and Update platform API to current schema heroku/platform-api#56

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

I've just seen this pull request from @tgmerritt: jalada/platform-api#1. I assume a change in some other library has caused this to happen. I really really wish Heroku would just take ownership of this.

@jrochkind
Copy link
Author

How do you recommend nudging heroku? Just file a support request?

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

@jrochkind yes, and mention it on the relevant issues / PRs?

@jrochkind
Copy link
Author

Will do. Not sure what you mean by "mention it on the relevant issues / PRs"

If we do need a "fork" long-term (and let's face it, it's already been long-term!), I think rather than actual fork, an in-gem monkey-patch of platform-api to add just what is needed would be preferable. I started looking at your fork to try to figure out what it's changing and if it can be easily monkey-patched in, but haven't really narrowed it down yet.

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

@jrochkind its irritating. Basically the platform-api gem is auto-generated via an API schema. All they need to do is run a rake task, and publish a new version. But for some reason they haven't for ages. This is even documented in their README; all I did was follow it. https://github.com/heroku/platform-api#building-and-releasing.

I'm going to do the same thing again now, to try and fix this issue.

@jrochkind
Copy link
Author

Alternatively, is it possible to talk to those endpoints without using the platform-api gem, just straight http? But I'm filing a ticket with heroku.

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

@jrochkind I've updated my fork of the gem: jalada/platform-api#2. Let me know if you have any further issues.

@jalada jalada closed this as completed Feb 17, 2017
@jrochkind
Copy link
Author

Hmm, using new master, everything appears to work at first, but when I try to connect to the site after the rake task thinks it completed fine, Chrome says the cert is bad -- it's a cert from herokuapps.com, not my host (rubyland.news).

So the cert hasn't actually been installed. This could be an unrelated problem, or user-error on my part. I have used letsencrypt-rails-heroku sucesfully and enjoyably several times before without problem. Is it a problem that my domain this time is 'bare', just rubyland.news? But the rake task gave me no errors or anything... just don't seem to have had a good cert installed, somehow.

This could be an unrelated issue?

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

Yup, I'm gonna guess that's unrelated. It looks like rubyland.news is perhaps pointing to the wrong DNS. *.herokuapp.com certificates are used when you've CNAMEd (or in your case ALIASed) your domain to my-app-name.herokuapp.com instead of my-app-domain.com.herokudns.com. See the docs here: https://devcenter.heroku.com/articles/custom-domains and check the output of heroku domains matches your DNS set up.

@jalada
Copy link
Collaborator

jalada commented Feb 17, 2017

Also you can check if the cert has been installed using heroku certs :)

@jrochkind
Copy link
Author

Yep, that was it, thanks, got it working.

Odd, I must have made that CNAME/alias before I realized the right way to do heroku CNAMEs. Odd that it pretty much works... but not for this.

Anyway, all good now.

@jrochkind
Copy link
Author

I know it's not this issue, but I wonder if the rake task could catch that you have your DNS wrong, and warn/error?

@jrochkind
Copy link
Author

@jalada Filed a heroku support ticket last week, got told it got forwarded to product manager, then got this response today. Has really nobody ever filed this before? I assume you did?

https://help.heroku.com/tickets/452923

Hey Jonathan 👋

Thanks for the feedback, this is the first i'm hearing about it. For my own apps i've been using https://github.com/dmathieu/sabayon in the mean time, which doesn't even use an API wrapper. I'll kick this over to our API team and see if in the mean time something can be done.

Perhaps the code can be copied from sabuyon for contacting the relevant API's using direct HTTP requests instead of the API wrapper? This gem has a lot cleaner architecture, IMO, than sabuyon.

@jalada
Copy link
Collaborator

jalada commented Apr 12, 2019

letsencrypt-rails-heroku is now using the officially-published version of platform-api as of version 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants