Laravel: RuntimeException in compiled.php line 7772: when making angular http requests - javascript

Hi i get this error sometimes when i use angular $http methods on a Laravel api. please help me to understand what this error is and anything i can do to get it solved. I have put the error log in a codepen for better viewing.
here is the link to the code pen: http://codepen.io/anon/pen/GjzJOX
http://codepen.io/anon/pen/GjzJOX

Run the following under project root:
php artisan key:generate

Related

Pulling Weather API Data and tweeting it

Apixu recently updated their endpoints(now weatherstack) and I'm having trouble figuring out how to fix my twitter weather bot. I am stuck right now with the following code
now fixed
I'm not sure if you're giving us a snippet or the full file, but you're not invoking your setup function.
You have missed certain things here (If you have sent the whole file content):
1) Import the Twit instance from package of twitter to send the post request.
2) Calling the setup() function from somewhere in the file.
Ok it turns out I forgot to install the axios package, it's working now.

Mirage `passthrough` is not working

I'm trying to use passthrough for a POST request in this Ember project
this.passthrough('/thirdeye/entity?entityType=ANOMALY_FUNCTION');
This is what the call looks like in app/mirage/config.js.
I got the following error:
Mirage: Your Ember app tried to POST '/thirdeye/entity?entityType=ANOMALY_FUNCTION',
but there was no route defined to handle this request.
Define a route that matches this path in your
mirage/config.js file. Did you forget to add your namespace?
Clearly, I've added that call to the config file, but it's not being picked up. I read that passthrough only works for >= jquery 2.x, which my project is.
Does anyone know what else could cause this?
I found out the problem was I had to do this.passthrough('/thirdeye/***'); since the call has query params. It works now.

AngularJS: Retrieving Videogular templates stored in $templateCache results 404 Error

I currently develop an AngularJS 1.5.9 Single Page Application on my localhost with NodeJS running backend, where I use
Videogular framework. http://www.videogular.com/
Everything is fine except inserting videogular object on my page. I strictly follow the given example: http://www.videogular.com/examples/simplest-videogular-player/
<videogular vg-theme="controller.config.theme.url">
<vg-media vg-src="controller.config.sources"
vg-tracks="controller.config.tracks"
vg-native-controls="true">
</vg-media>
</videogular>
But it results in AngularJS error:
(sessionId in the request is the auth token not linked to current problem)
I have found the following in videogular.js :
$templateCache.put("vg-templates/vg-media-video", "<video></video>");
$templateCache.put("vg-templates/vg-media-audio", "<audio></audio>");
I have tried to store files locally, and the error disappeared
Actually there are a lot of plugins for Videogular and they all are using $templateCache to store some files in the cache, so it would be very confusing to manually store them locally in my app folder.
How can such files be stored in the cache using $templateCache so they can be extracted properly?
I apreciate your help.
UPDATE
I have tried insert $templateCache.get to directive, where the part is loading with error 404, and it works. But still doesn't work as it supposed to be.
It seems like there is an issue with sessionId that you pass in URL parametrs, do you actually need it?
I guess your interceptor or whatever auth managing module is wrong configured, so you don't check request target URL and id parameters are going to be added for local calls as well as for backend calls.

Why can't I connect to this WDSL in Apigee

I need to connect to:
https://www.webselfstorage.com/webservices/externaldataaccessservice.asmx?WSDL
through Apigee to create a REST to SOAP to REST proxy.
I keep getting a box that pops up when I "fetch" the WSDL that reads "Server Error. Internal Error".
What Am I doing wrong here? The webservices documentation came with a username and password but there isn't a place to enter these on apigee so I have to wonder if that might be the issue.
Disclosure: I work at Apigee.
The internal error message is a problem in how we are displaying an error message when we run into a problem reading the WSDL and should be fixed in the future.
The reason it's having a problem reading your WSDL is because of this line, which exists several times in the WSDL:
<s:element ref="s:schema" />
I'm no XML expert, so what does that mean? There is a schema that contains an element that is in turn also schema? My head hurts. :)
Do you have any control over the WSDL, or is that a 3rd party WSDL that you can't modify?
I saved a copy of the file and made the following changes to get it to work. I added a line after the schema definition:
<s:schema elementFormDefault="qualified" targetNamespace="http://www.webselfstorage.com/WebServices/ExternalDataServices">
<s:element name="schema" type="s:schema"/>
Then changed the s:schema refs to:
<s:element ref="tns:schema" />
And the fetch worked...
I'll try to follow up with more details, but just wanted to give you an update of what I've found so far.

$httpBackend not working fine with ngMocksE2E module

I am making a simple application frontend with Angular JS (v1.2.16). I will be using REST API but that API is not build yet and its specs are complete. So based on the Link : $httpBackend
- service in module ngMockE2E, I can mock API request along with my development Process.
I have tried to do the same and come up with a demo but its giving me an error where I feel that its failing for passThrough function.
demo is available on this Link http://ngdemo.ws01.tranceserve.com/#/projects.
Now it gives me an error stating :
Error: Unexpected request: GET /views/projects.html
No more request expected
Please Help.
$httpBackend isn't prepared to handle the request for the views. Add a passthrough for your views:
$httpBackend.whenGET(/^\/views\//).passThrough();

Categories