Reloading an async hasMany with links from server with Ember Data - ember.js

It's basically this question:
How to reload an async with links hasMany relationship?
Where the provided solution doesn't work for me anymore using Ember 1.6.1 with Ember Data 1.0.0-beta.8.
What I get is this:
Error: Assertion Failed: The response from a findHasMany must be an Array, not undefined
at new Error (native)
at Error.EmberError (http://localhost:3000/assets/ember.js?body=1:2966:23)
at Object.Ember.assert (http://localhost:3000/assets/ember.js?body=1:119:15)
at http://localhost:3000/assets/ember-data.js?body=1:11290:15
at invokeCallback (http://localhost:3000/assets/ember.js?body=1:10559:19)
at publish (http://localhost:3000/assets/ember.js?body=1:10229:9)
at publishFulfillment (http://localhost:3000/assets/ember.js?body=1:10649:7)
at http://localhost:3000/assets/ember.js?body=1:16067:9
at DeferredActionQueues.invoke (http://localhost:3000/assets/ember.js?body=1:8597:18)
at Object.DeferredActionQueues.flush (http://localhost:3000/assets/ember.js?body=1:8647:15)

Related

Why is res.cookie() not working in my sails.js app?

Acording to sails.js docs, it is only needed to use req.cookie('name', 'value') in order to make it work, however I can't make it work.
error: Sending 500 ("Server Error") response:
TypeError: res.cookie is not a function
at Object.login [as acounts/login] (/home/emirc/Escritorio/projects/letrica-vB0.1/letrica-beta/api/controllers/AcountsController.js:154:9)

Ember / Ember Data - Error: The adapter operation was aborted after 201 created

Ember 3.0.0
Ember Data 3.0.2
Ruby on Rails 5.2.0
When using Ember and Ember Data to create a new record on a backend server using the default adapter (JSON_API) I get the following weird scenario:
The data is posted correctly to the backend and the backend replies with a 201 Created reply along with the new record rendered as JSON_API. I have used cUrl to simulate a POST to the backend and the reply is correct. However the adapter still rejects the operation.
When storing the record I use:
newAccount.save().then(allIsOk).catch(failure);
Even though the record is saved correctly and the backend server replies with a 201 Created the allIsOk is never called - only the .catch(failure) is triggered.
I have tried to change the reply from the backend server to 204 No content but the problem persists.
The CORS config for the backend server is as follows:
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*',
headers: :any,
methods: %i[get post put patch delete options head]
end
end
We have developed a lot of apps in the past using the 2.x branch of Ember without any problems. I am really not sure where the error could be. The backend seems to be working correctly returning the correct data so I assume that the problem is with Ember / Ember Data or just me missing a tiny detail somewhere.
The only related topics I can find are these:
POST request to API from Ember often fails with 'The adapter operation was aborted Error'
https://github.com/cyu/rack-cors/issues/106
Found the solution to the problem. Please see here for info:
https://github.com/emberjs/data/issues/5440

Ember app fails in ie9 - blank screen originating from active-model-serializer?

I'm having a problem getting my ember app to work in ie9. I'm using:
DEBUG: -------------------------------
DEBUG: Ember : 1.13.3
DEBUG: Ember Data : 1.13.5
DEBUG: jQuery : 1.11.3
DEBUG: -------------------------------
I'm getting this error:
Error while processing route: index, Adapter operation failed
And a blank screen. I think i've tracked the issue down to the serializer. I'm currently using ActiveModelSerializer. When i remove it, I get more error messages but the errors are consistent across browsers. Any idea what could be occuring?

findQuery - Emberfire error

I am getting this errror:
This is the line I am using to get data --> return this.store.find('food', {feel: 2});
I am using,
Ember : 1.10.0
Ember Data : 1.0.0-beta.12
EmberFire : 1.3.3
jQuery : 1.11.2
Error while processing route: index Assertion Failed: You tried to load a query but your adapter does not implement findQuery Error: Assertion Failed: You tried to load a query but your adapter does not implement findQuery
I'm am not sure if this is Ember.js specific or if the root of the problem is coming from Firebase? Any tips?
EmberFire 1.3.3 did not support findQuery but the latest release (1.4.1) does. Details are here: https://www.firebase.com/blog/2015-03-09-new-emberfire-features.html

Error Occurred [object Object] facebook Open Graph

i have some trouble here...
i've just setup a facebook opengraph api on my website, it works well when i using my facebook account but i get an error message when i test it using my another account...
i get Error Occurred [object Object] when try to access http://www.kiosban.com/jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/ , and when i try to look over my GoogleChrome console i get this error
Uncaught ReferenceError: jQuery is not defined /jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/:1115
Uncaught ReferenceError: $ is not defined /jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/:1716
Uncaught SyntaxError: Unexpected token < index.php:1
Please specify a ShareThis Publisher Key
For help, contact support#sharethis.com buttons.js:1
Unknown RPC service: undefined apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=l9xafNDlycA.en_US./sv=1/am=!PemfnfjrL2yI81ARQg/d=1/rs=AItRSTPblCJvoWHsMeVNOsKiKGakP1copQ/cb=gapi.loaded_0:206
Unknown RPC service: undefined apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=l9xafNDlycA.en_US./sv=1/am=!PemfnfjrL2yI81ARQg/d=1/rs=AItRSTPblCJvoWHsMeVNOsKiKGakP1copQ/cb=gapi.loaded_0:206
Unsafe JavaScript attempt to access frame with URL http://www.kiosban.com/jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/ from frame with URL http://www.facebook.com/plugins/login.php?add_to_profile=false&api_key=384945498218921&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D6%23cb%3Df1382a12d%26origin%3Dhttp%253A%252F%252Fwww.kiosban.com%252Ff4bed3cb%26domain%3Dwww.kiosban.com%26relation%3Dparent.parent&extended_social_context=false&locale=en_US&login_text=&max_rows=1&one_click=false&sdk=joey&show_faces=true&show_login_face=false&size=small&tense=past&width=200. Domains, protocols and ports must match.
zYYvIvm5_Za.js:89
g.categories.(anonymous function).(anonymous function) zYYvIvm5_Za.js:89
(anonymous function) BOwYwRudgQC.js:5
n _xZSy89IRtb.js:22
h.inform _xZSy89IRtb.js:25
v zYYvIvm5_Za.js:27
p
any idea about my problem??
Uncaught ReferenceError: jQuery is not defined /jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/:1115
Uncaught ReferenceError: $ is not defined /jangan-nyalakan-lampu-hazard-dikala-hujan-lebat/:1716
these are because jQuery hasn't loaded correctly, or you are trying to use a jQuery dependent method or selection without jQuery being defined. Make sure you check in what order things are being loaded.
"Please specify a ShareThis Publisher Key
For help, contact support#sharethis.com"
I came cross with this error before as well. please check whether you define
<script type="text/javascript"> stLight.options({ publisher: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }); </script>
Use your actual publisher key in "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
After I inserted this into my code, The error gone away.