flutter firebase messaging with http to send push notification. i'm going to crazy becuase of this - flutter

status is pointing to 401.
I've double-checked to see if I've entered a key or token incorrectly, but that seems unlikely, because I'm not using a
copy-pasted it verbatim, so I'm guessing that something in the
must be going wrong somewhere else.
What I'm trying to do now is, when the post is commented on
So I asked GPT, and he showed me the code in the same form as the picture I posted. Of course, I'm getting the token through firebase messaging just fine, but the problem is that gpt seems to have written the code with an outdated version of the http package, so I googled for the latest version
so I thought it would work, but it didn't.
I've been struggling with this for hours now, and I'm hoping you guys can help me out.

Related

Kadena Marmalade api errors

Last time I used marmalade(https://kadena-io.github.io/marmalade/), I could see data on it. but I can't see them today.
I was investigating why I could not see any data, and found these api error.
Error Image
This means, server is not working? How can I fix this?

Weird BaseOptions problem in Dio 4.0.0 (Dart)

I met some strange behavior, which got my mind blow out.
I have a piece of code
import 'package:dio/dio.dart';
...
var baseOptions = BaseOptions(
baseUrl: "http://localhost:8080");
If I run it from simple Dart console program I got this in debugger which at final works OK:
However when I do THE SAME THING somewhere inside Flutter stuff, I get this weird thing which doesn't work:
What's going on here? What am I doing wrong in the Flutter case?
I finally found the answer. I was wrong with my assumptions in this question, but I will not delete it for people who would have the same root cause analysis path as me.
First of all my problem was not weirdness in BaseOptions. The actual error I got from Dio was just string: "XMLHttpRequest error". I started to find anything strange and found divergence in BaseOptions which led me to idea that the problem was the weird BaseOptions. Not it's not. The real root cause was with CORS. Since my build used web based Flutter and an app was opened in Chrome the CORS defense system started to work and prevented the requests from sending. In console Dart app everything was ok since there is no CORS involved. One more problem was that I used POST request type and a custom header, which both are also not very welcome for CORS policies.
So to fix my problem what I had to do - is to fix CORS.
But what is going on with BaseOptions? I don't know for sure but most likely it is related to the way how Dart code compiled to JS. Looks a bit ugly in debugger, but it seems JS needs to know which field comes from which place for some reason.

google earth tour error

In the past I had successfully created several Google Earth tours complete with audio and animation. As best I can remember, I looked at one of my tours 2weeks ago? and things were working fine.
But I look at the tours now on both my local machine and my host web server and the google earth tours have disappeared. When I look in firebug at where the code should be, I see the following error:
Failed to process gadget http://code.google.com/apis/kml/embed/tourgadget.xml. Reason: Unable to retrieve spec for... code.google.com/apis/kml/embed/tourgadget.xml. HTTP error 404
I have not changed anything within my code, so am completely at a loss.
Can anyone share what might have happened or what I need to do to get my GEs going again?
My web site is www.kavelookout.com...See www.kavelookout.com/fingers.html for where a tour should be.
UPDATE:
I believe this is the GE tour gadget code I need...
http://www.gmodules.com/ig/creator?synd=open&url=http://code.google.com/apis/kml/embed/tourgadget.xml
but as you can see, clicking on the 'More info...' link takes me to... google.com/ig/directory?synd=open&url=http://…
Does anyone know why GE Gadgets is not working at this time? Or what link I should be using to embed GE Tours? Can anyone confirm that GE Tours are having a problem, or is it me?
Much Thanks,
k
You should notice that the pages you're trying to process are no longer available, so, that's the nature of the error.
Check the link, it sais that the page is not being found, that's why you're getting a 404 error.
So I figured it out.
The embed code that was generated in the past was...
script src="http:// www.gmodules.com/ig/ifr?url=http://code.google.com/apis/kml/embed/tourgadget.xml
I'm not sure why or when it changed, but I found that the GE Tour gadget at this URL...
http://www.gmodules.com/ig/creator?synd=open&url=http://dl.google.com/developers/maps/tourgadget.xml
...now generates this new embed code...notice the differences...
script src="//www.gmodules.com/ig/ifr?url=http://dl.google.com/developers/maps/tourgadget.xml
Again, I'd love to know why things changed, but am happy to know there is an answer.

Issues in using facebook api for ios sdk

I have downloaded the source project from
sourcecode.
I came across many issues over there, then I changed the source header path then changed the compiler version in the project settings, then all those were solved, now there is no errors, it runs, when I click FBLoginButton ,Facebook Login Dialog appeared but it looks empty,
I dont know why, The app key and app secret key were placed correctly.
I tried with device,if there would probm with simulator, still looks same.
what Im doing wrong, I had searched a lot, not found any solution, any ideas pls tell me
I have the same problem.
I have opened a bug here : https://developers.facebook.com/bugs/279606225487338
You can also vote for it, so that FB may take a look at it. Let's hope they solve it.
We had two apps in the app store which used this old api of facebook for login and they also g=have stopped working... So most probably Facebook has stopped support for this but I couldn't fond anything official. I guess we will have to incorporate the new Api.. :/ If I find something I will post here...

Has anything changed in the past ~48 hours that would break a legacy canvas app using require_login()?

Nothing has changed on my end (at least I don't think anything has), but all of a sudden I'm unable to launch my app (and users reportedly are unable to install/launch) which uses the legacy require_login() function from an old version of the PHP SDK.
When I go to apps.facebook.com/myapp, I'm brought into a redirect loop between that URL and http://mysite.com/myAppsCanvasURL.
I've Googled and found some old posts where people report similar behavior but it doesn't seem like there was any resolution, and I still have no idea what could have caused this to happen out of the blue.
Any help would be greatly appreciated.
Thanks!
dshap
Figured out the answer to my own question.
My app requires access to both the user's uploaded photos as well as the user's photo tags.
To do this, I was requesting the (previously) necessary permissions by calling:
require_login('user_photos, user_photo_video_tags');
According to this developer blog post, the "user_photo_video_tags" permission is not supposed to be deprecated until November 22nd, however if I use it right now it breaks my app - if I simply remove it, there are no issues and the app works as expected.
The weird thing is I'm not seeing any exceptions thrown, but then again I'm not seeing any exceptions thrown even if I do something like:
require_login('user_photos, fake_permission');
So maybe this has something to do with the out-dated version of the PHP SDK that I'm using.
Hopefully that helps if someone else out there is having the same problem.