FB SDK produces a PHP Fatal error [duplicate] - facebook-graph-api

This question already has answers here:
facebook graph api not work from 2.2 to 2.3
(1 answer)
FB SDK produces a PHP Fatal error
(3 answers)
Closed 5 years ago.
Starting now, a FB SDK integration that worked very well allowing people to login to our site via their Facebook account just stopped working. The server logs show the following error
PHP Fatal error: Cannot use object of type stdClass as array in fb-sdk/FacebookRedirectLoginHelper.php on line 191
We have not done any relevant code change that should have initiated it.
Have we missed an upgrade?

Replace "$response['access_token']" with "$response->access_token" on line 186 and 187 in FacebookRedirectLoginHelper.php

Related

Facebook login failed: "fbauth2:/" - error: "This app is not allowed to query for scheme fbauth2 iOS 13, Xcode 11

I recently came across an issue with Facebook Login after updating to iOS 13 and Xcode11. Login worked fine, all doc configuration is correct but two of my apps have this error now.
-canOpenURL: failed for URL: "fbauth2:/" - error: "This app is not allowed to query for scheme fbauth2
There is a similar question but it relates to iOS 10, and the issue clearly states that the info.plist configuration was incorrect, which is not the case here.
-canOpenURL: failed for URL: "fbauth2:/" - error: "This app is not allowed to query for scheme fbauth2" (OSStatus error -10814.)
Upgrading to the current FBSDK should resolve the problem. iOS 13 requires the implementation of ASWebAuthenticationPresentationContextProviding, which was not available until FBSDKCoreKit 5.4.
FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/FBSDKBridgeAPI.m was modified to support iOS 13's requirement to implement ASWebAuthenticationPresentationContextProviding in FBSDKCoreKit 5.4. (The current version is 5.8.) Versions prior will no longer work.
The needed change is posted here: https://github.com/facebook/facebook-ios-sdk/commit/6b061099f339ef0e8bde2e2c2163ef5a3c1b8340#diff-72593591275d63edfb1bfad837e4c32f
I was unable to upgrade due to a dependency with AWS, but I was able to patch the 4.42 version of the file based on the differences in the diff above.
The error -canOpenURL: failed for URL: "fbauth2:/" - error: "This app is not allowed to query for scheme fbauth2 was a symptom of the FBSDK attempting to open Facebook, which was not installed, so it was just a warning before it would fall back to browser-based FB auth.

Cannot send emails using drupal 8 rules

I have the drupal 8 varbase distribution with the rules plugin installed.
(version Rules: 8.x-3.0-alpha4
Typed Data: 8.x-1.0-alpha1)
When I make a rule to send an email when a user changes his/her account, I get the following error:
The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Object of class Drupal\user\Entity\User could not be converted to string in Drupal\Core\Mail\Plugin\Mail\PhpMail->format() (line 32 of core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php).
I use direct input data for all fields of the form, no data selectors. How can I fix this?
Updates to drupal solved the issue, this question can be deleted.

How do I get Alexa Voice Service registration code?

How do I get a registration code or otherwise solve this problem?
While writing this question, I realized the crux of this problem is the bottom-most part of this question: I'm not getting the popup I'm supposed to get and when I enter the URL in a browser it says invalid registration code.
I'm attempting to develop an Alexa Voice Service application. Website/companion service only. I have gone through the Reference Implementation Guide twice and have double checked that all of the setup has been done correctly.
This is the server error I get: invalid registration code. I never did anything with a registration code and can't seem to find anything about a registration code (relevant to Alexa) anywhere after googling quite a bit.
Listening on port 3000
error: { [InvalidRegistrationCode: The provided registration code was invalid.]
name: 'InvalidRegistrationCode',
message: 'The provided registration code was invalid.',
status: 401 }
Error: Can't set headers after they are sent.
Here's the client output:
vlcj: (DefaultMediaPlayer.java:183)
addMediaPlayerEventListener(listener=com.amazon.alexa.avs.AVSAudioPlayer$1#4b3a4950)
There was a problem connecting to the Companion Service. Trying again in 2 seconds. Please make sure it is up and running.
[DEBUG] joining on thread Thread[Timer-0,5,com.amazon.alexa.avs.AVSApp]
There was a problem connecting to the Companion Service.
Trying again in 2 seconds. Please make sure it is up and running.
The AVS launcher opens too, and when I record something and send it I get:
com.amazon.alexa.avs.AVSException: 403 Invalid Access Token
The instructions mention (at the very bottom of the reference guide) that I need to:
Please register your device by visiting the following website on any system and following the instructions: https://localhost:3000/provision/************** That URL is supposed to pop something up once the companion service but that hasn't happened.
Any thoughts on how can I fix this?
I was following a good document Project: Raspberry Pi + Alexa Voice Service at https://github.com/amzn/alexa-avs-raspberry-pi . It describes all steps very well.
Please take a look at the following steps:
3 - Getting started with Alexa Voice Service
3.1 Register for a free Amazon Developer Account
3.4 Register your product and create a security profile.
6 - Enable Security Profile
This thread on the Amazon developer forums seems related: http://forums.developer.amazon.com/forums/thread.jspa?threadID=11327&tstart=0
Quoted response:
There are a number of potential issues causing that error.
You might be sending an invalid scope. Are you sending "alexa:all" as
the scope? Or, your security profile might not be correctly linked. Is
it selected in the dropdown on the developer portal?
Are you getting an access token from the companion service, or is the
text box blank? If you're not getting an access token, check that your
device serial number matches between the companion service and the
java client. If you're getting an access token, the problem is more
likely with your security profile.
You should also look at these threads to see if they're helpful...
(links removed due to reputation requirement)
If that doesn't help, you'll probably have more luck asking the AVS team directly on their forum site.

ColdFusion 11 Administrator: ColdFusion Archives Page shows error

I am in trying to deploy .car file from ColdFusion 9 into ColdFusion 11.
When I open ColdFusion 11 Administrator -> Package & Deployment -> ColdFusion Archives -> It shows Internal Server Error 500.
Application Log file shows the error below:
Element CAR.ARCHIVES is undefined in REQUEST. The specific sequence of files included or processed is: E:\ColdFusion11\cfusion\wwwroot\CFIDE\administrator\archives\index.cfm, line: 247
Any help on this would be highly appreciated.
Thank you in advance !!

Using ColdFusion and getting "Internal Server Error" instead of ColdFusion error page [duplicate]

This question already has an answer here:
IIS7 Hijacks My Coldfusion Error Page
(1 answer)
Closed 8 years ago.
I'm using IIS7 with Windows Server2008 R2. I have ColdFusion 11 set up and running. Everything seems to work fine except whenever I have a coldfusion error, I get an error message from IIS instead of ColdFusion. I get the generic 500 - Internal Server Error instead of the ColdFusion page telling me what is wrong.
This is a new installation on an empty server. Nothing else is running on this machine and nothing else has been loaded.
In the ColdFusion Administrator I have the check boxes for "Enable Robust Exception Information" and "Enable Request Debugging Output" checked.
If there are no errors on the page, the page works fine. Its just hard to debug when I can't see what's wrong if there is a typo or something.
Thanks.
Check your "enable http status codes" setting under server settings > settings in the CF administrator. http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf3638e6-7ffc.html
When CF sets a 500 status code on error IIS sees this and responds with its error page.
While unchecking this option will technically solve your issue the real solution would be to modify IIS' settings so that it serves up your desired error page. You shouldn't be sending coldfusion's error pages to users on a production site.