I have just updated a project from ember-cli 0.37 to 0.39 and api requests are not proxied to the rails backend anymore. I've run ember init and update dependencies but it still doesn't work.
ember-cli 0.39
ember 1.6.0-beta.5
ember-data 1.0.0-beta.8
jquery 2.1.0
Thanks.
This should be fixed in master now. See https://github.com/stefanpenner/ember-cli/pull/1263 for details.
Related
I'm working on an old project using Savon to connect to the SalesForce api. I'm getting this error:
UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https
How do I get it to use TLS 1.2? Or is there a simple alternative to Savon that does use TLS 1.2?
Savon uses HTTPI as a common interface for Ruby's HTTP libraries
Configure Savon to use a specific library with:
HTTPI.adapter = :httpclient
HTTPI.adapter = :curb
...
it currently tries the libs in the following order:
[:httpclient, :curb, :em_http, :excon, :net_http, :net_http_persistent]
If you haven't installed httpclient, it will try curbnext and so on.
You should try setting an explicit lib and see if it works for you.
Just to help others in the future who may face the same problem. It seems the TLS level is not built in the savon gem but in the httpi adapter. By changing the adapter to httpclient (installed the gem, put require 'httpclient') the savon gem starts using it without further configuration. Just remove the ssl_level params and the latest and more modern cypher is used. Problem solved.
I'm currently creating a chat using elixir. but anytime i try running the app, the websocket gives an error on sever console
The client's requested channel transport version "2.0.0" does not match server's version requirements of "~> 1.0"
And browser console:
WebSocket connection to 'ws://localhost:4000/socket/websocket token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJVc2VyOjMiLCJleHAiOjE1MDQ0OTE1NTQsImlhdCI6MTUwMTg5OTU1NCwiaXNzIjoiU2xpbmciLCJqdGkiOiIyNWY5NDZkNy1jNDg5LTRiYWMtYjJkNS0zZDA4OTdkNDU1ZWMiLCJuYmYiOjE1MDE4OTk1NTMsInBlbSI6e30sInN1YiI6IlVzZXI6MyIsInR5cCI6ImFjY2VzcyJ9.nh-DaQfY8OuI0EBE7lILFx6hjm6J_ZrynXHeOLr1-wM-fXnDakqrZUSN1XFQnr0x0KM9WFOkLEQnip5DcsKxXw&vsn=2.0.0' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
your phoenix javascript library (dependency) is updated without notice. You should fix version so it is limited to less than 1.3.0 in package.json (if you are using npm) or bower.json if you are using bower to use old implementation, or use narrowtux solution if you downloaded js file manually. Or upgrade phoenix version.
With Phoenix 1.3, a new version of the transport protocol was released. It seems that you've somehow included the new version of the javascript client in your project, but are still running on Phoenix 1.2.
As a workaround, you can copy and reference the old client script here: https://github.com/phoenixframework/phoenix/blob/v1.2/web/static/js/phoenix.js
I have a REST API that was working with Jersey 2.6 and Swagger 1.3.7. I read that Jersey 2.9 fixes a warning that I was getting so I upgraded to the latest Jersey 2.16 but then Swagger stopped working. I went back and upgraded one version at a time until I saw that Swagger was working with 2.15 so I settled on that. Now, the PUT API fails with Swagger with the following error:
The server refused this request because the request entity is in a format not supported by the requested resource for the requested method
The API works using FireFox RESTClient and specifying "application/json".
I do have "jersey-media-json-jackson" as a dependency and call "Client client = ClientBuilder.newClient().register(JacksonFeature.class);" in the program.
I tried upgrading Swagger but that did not help.
Has Swagger been verified to work with Jersey 2.15/2.16?
I've recently managed to get swagger-core to work with Jersey 2.16 with a similar issue. Keep in mind they are using the latest version (1.5.X) and not 1.3.X but the same solution will apply.
The problem is most likely with version resolution, specifically, the one of jackson-databind. For some reason, even jersey-media-json-jackson 2.16 depends on an older version of jackson-databind, even though it works fine with the latest version. Without having more details, it would be difficult to suggest a full solution, but you can follow the dependency tree and see the conflicts there.
If you do require further assistance, I'd suggest either using our mailing list, or even better, the IRC channel where we could interact online and resolve it.
Duplicate: Requests proxying stop working after update to ember-cli 0.39
This is known, fix is here and currently in master.
I just upgraded to ember-cli 0.39, and it seems my API requests aren't being proxied to my (rails) backend. This was working in 0.37.
I run the following commands from the respective directories
rails s -p 3900
ember s --port=4900 --proxy=http://0.0.0.0:3900
The ember app serves pages that don't hit my API, but when my routes try to fetch a model (I'm using ember-data), the API response is just my ember app's index.html. I've set some breakpoints in my rails code, and they're not getting triggered, so I know the API requests aren't being proxied appropriately.
Interestingly, I have a login route I use, and that does seem to proxy back to the rails app. But, whenever I use store.find('someModel'), the response is the ember app'sindex.html` and the app chokes.
As part of upgrading to .39 I changed some of my libs over to the ember-cli-addons:
ember-cli-ember-data
ember-cli-ember-simple-auth
I'm not sure if that has anything to do with it. Seems like it could be an ember-data thing.
This is known, fix is here and currently in master.
I use sinatra 1.2.6 and mango_mapper version 0.9.2 but project is slow for render page.How I config mongomapper and sinatra
I'm not sure what you mean by configuring Mongomapper and Sinatra. I use this in my configure block:
MongoMapper.database = ENV['MONGOLAB_DATABASE']
MongoMapper.connection = Mongo::Connection.new(ENV['MONGOLAB_URL'], 27107)
MongoMapper.database.authenticate(ENV['MONGOLAB_USER'], ENV['MONGOLAB_PASS'])
But then this is not just for Sinatra and is pretty much required everywhere. Performance is also ok here. You could check out the rstatus project on Github which uses now Rails but used to be Sinatra. So compare your code with theirs.