Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection error due to array value #916

Closed
AndreeaCristinaRadacina opened this issue Feb 16, 2024 · 17 comments · Fixed by #918
Closed

Redirection error due to array value #916

AndreeaCristinaRadacina opened this issue Feb 16, 2024 · 17 comments · Fixed by #918
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. large (1-2d) - This label is used for issues that can be completed within 2 days or less. Priority-High Expected resolution time - up to 2 business days.

Comments

@AndreeaCristinaRadacina
Copy link

AndreeaCristinaRadacina commented Feb 16, 2024

Description

Several users complained about the fact that they have not been redirected when trying to connect to Facebook since the latest update.

error encountered: Value is empty : pages in Array ( [id] => czoxNjoiMjI0NTI3NjA2MjMyOTk3MSI7 [pages] => Array ( ) )

ref: https://secure.helpscout.net/conversation/2512440165/404898?viewId=212385

Step-by-step reproduction instructions

  1. Go to the ROP dashboard
  2. Click to add a new Facebook account
  3. Make the configurations

Screenshots, screen recording, code snippet or Help Scout ticket

image image I know the above error appears when you're not admin, as per - https://docs.revive.social/article/1374-facebook-error-value-is-empty-pages-in-array, but I am an admin, and I still get this error.

Environment info

No response

Is the issue you are reporting a regression

Yes, this is a regression.

@AndreeaCristinaRadacina AndreeaCristinaRadacina added the bug This label could be used to identify issues that are caused by a defect in the product. label Feb 16, 2024
@pirate-bot pirate-bot added customer report Indicates the request came from a customer. regression Issue represents a change in behavior from a previous version that is not intended or desired.. labels Feb 16, 2024
@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina AndreeaCristinaRadacina changed the title Not redirected + Value is empty : pages in Array ( [id] => czoxNjoiMjI0NTI3NjA2MjMyOTk3MSI7 [pages] => Array ( ) ) even if I'm admin Redirection error due to array value Feb 16, 2024
@poonam279
Copy link

@AndreeaCristinaRadacina
Copy link
Author

@vytisbulkevicius vytisbulkevicius added the Priority-High Expected resolution time - up to 2 business days. label Feb 17, 2024
@Soare-Robert-Daniel
Copy link
Contributor

Regarding the functionality. The login and sharing posts with Facebook are working.

What needs to be fixed is the redirect after authorization.

After we authorize the user in the popup, we inform them that a redirect must be done, and if it is not done, we tell them to inform the support.


The problem is that controlling the popup with a different origin is unstable.

When trying to programmatically close the popup, a dom exception is raised. See https://developer.mozilla.org/en-US/docs/Web/API/Window/open#same-origin_policy

Screenshot 2024-02-19 at 14 42 22

Because of this error, the next step, which is the page reload, is not done. Thus, the user does not observe that the account might have already been added.


Changing the flow

Once the authorization is in the popup. We do two things:

  • Reload the plugin dashboard page; thus, the user will see the refreshed page.
  • In the popup, tell the user that the account info has been sent and that he can close the popup if he sees the account added. (We remove all mentions of redirect since we are no longer doing it.) -- If the user does not see the account, he can take a screenshot and send it to support.

@vytisbulkevicius

@Soare-Robert-Daniel Soare-Robert-Daniel linked a pull request Feb 19, 2024 that will close this issue
@Soare-Robert-Daniel
Copy link
Contributor

+1 https://secure.helpscout.net/conversation/2501854913/403271?viewId=212385

Regarding Facebook SDK returned an error: Cross-site request forgery validation failed. Required param "state" missing from persistent data. I see that it happens when you try to add an account but do not finish (like closing the popup) and you try again without refreshing the page.

If you refresh the page, it will not give the error anymore.

@AndreeaCristinaRadacina
Copy link
Author

@poonam279
Copy link

@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

@Soare-Robert-Daniel
Copy link
Contributor

+1 https://secure.helpscout.net/conversation/2515357973/405248?folderId=212385

This is related to the refresh. #918

https://secure.helpscout.net/conversation/2513631661/405035?viewId=212385
https://secure.helpscout.net/conversation/2515310322/405245?viewId=212385

Those two need to reintroduce their X, Twitter account since we changed the server, and they used our App to post.

For Facebook, I think it is the same. They need to reintroduce their account to allow for new permissions.

@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

@Soare-Robert-Daniel another customer reported this issue - https://secure.helpscout.net/conversation/2512168501/404876?viewId=212385

He has multiple Facebook accounts and some of them cannot be connected. He gets an error similar to what is described in this issue. Can you kindly confirm if it's the same or if I should open another issue?
file

@Soare-Robert-Daniel Soare-Robert-Daniel added the large (1-2d) - This label is used for issues that can be completed within 2 days or less. label Feb 25, 2024
@vytisbulkevicius vytisbulkevicius removed the regression Issue represents a change in behavior from a previous version that is not intended or desired.. label Mar 8, 2024
@AndreeaCristinaRadacina
Copy link
Author

@AndreeaCristinaRadacina
Copy link
Author

Everything is fine now. The Business pages are also added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. customer report Indicates the request came from a customer. large (1-2d) - This label is used for issues that can be completed within 2 days or less. Priority-High Expected resolution time - up to 2 business days.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants