fbsamples / original-coast-clothing

Sample Messenger App - Original Coast Clothing
https://fb.me/get-sample-oc
Other
201 stars 229 forks source link

Error: "Unable to create a persona"(400) #66

Closed thangphamnd123 closed 3 years ago

thangphamnd123 commented 3 years ago

Describe the bug

After following the guide and deploy on heroku, when access this link: https://xxxxxxx.herokuapp.com/profile?mode=all&verify_token=

I got the error: 2020-10-29T07:06:31.872953+00:00 app[web.1]: Setting Messenger Profile for app 3476353462387655 2020-10-29T07:06:31.874542+00:00 app[web.1]: Fetching personas for app 3476353462387655 2020-10-29T07:06:31.876053+00:00 app[web.1]: Enable Built-in NLP for Page 618148791910439 2020-10-29T07:06:31.876893+00:00 app[web.1]: { 2020-10-29T07:06:31.876894+00:00 app[web.1]: whitelisted_domains: [ 2020-10-29T07:06:31.876895+00:00 app[web.1]: 'https://fbmessengerbot2020.herokuapp.com', 2020-10-29T07:06:31.876896+00:00 app[web.1]: 'https://fbmessengerbot2020.herokuapp.com' 2020-10-29T07:06:31.876896+00:00 app[web.1]: ] 2020-10-29T07:06:31.876896+00:00 app[web.1]: } 2020-10-29T07:06:31.876946+00:00 app[web.1]: Setting Messenger Profile for app 3476353462387655 2020-10-29T07:06:32.163092+00:00 app[web.1]: {} 2020-10-29T07:06:32.163403+00:00 app[web.1]: Creating a Persona for app 3476353462387655 2020-10-29T07:06:32.164430+00:00 app[web.1]: Creating a Persona for app 3476353462387655 2020-10-29T07:06:32.165240+00:00 app[web.1]: Creating a Persona for app 3476353462387655 2020-10-29T07:06:32.165857+00:00 app[web.1]: Creating a Persona for app 3476353462387655 2020-10-29T07:06:32.336198+00:00 app[web.1]: Request sent: {"success":true} 2020-10-29T07:06:32.371938+00:00 app[web.1]: Request sent: { result: 'success' } 2020-10-29T07:06:32.441556+00:00 app[web.1]: Unable to create a persona: Error: 400 2020-10-29T07:06:32.441567+00:00 app[web.1]: at Request. (/app/services/graph-api.js:250:20) 2020-10-29T07:06:32.441567+00:00 app[web.1]: at Request.emit (node:events:327:20) 2020-10-29T07:06:32.441568+00:00 app[web.1]: at Request.onRequestResponse (/app/node_modules/request/request.js:1059:10) 2020-10-29T07:06:32.441568+00:00 app[web.1]: at ClientRequest.emit (node:events:327:20) 2020-10-29T07:06:32.441569+00:00 app[web.1]: at HTTPParser.parserOnIncomingClient (node:_http_client:652:27) 2020-10-29T07:06:32.441569+00:00 app[web.1]: at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17) 2020-10-29T07:06:32.441570+00:00 app[web.1]: at TLSSocket.socketOnData (node:_http_client:518:22) 2020-10-29T07:06:32.441570+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20) 2020-10-29T07:06:32.441570+00:00 app[web.1]: at addChunk (node:internal/streams/readable:304:12) 2020-10-29T07:06:32.441571+00:00 app[web.1]: at readableAddChunk (node:internal/streams/readable:279:9) {"error":{"message":"(#100) Upload failed","type":"OAuthException","code":100,"error_subcode":2018007,"fbtrace_id":"Ako2-4yhSDPMyaWbKQzzzjH"}} 2020-10-29T07:06:32.441892+00:00 app[web.1]: { Daniel: undefined } 2020-10-29T07:06:32.451312+00:00 app[web.1]: Request sent: {"error":{"message":"(#2200) Callback verification failed with the following errors: HTTP Status Code = 404; HTTP Message = Not Found","type":"OAuthException","code":2200,"fbtrace_id":"AGQBIX0zxnGpAJrSLVtQoa0"}} 2020-10-29T07:06:32.457417+00:00 app[web.1]: Unable to create a persona: Error: 400 2020-10-29T07:06:32.457418+00:00 app[web.1]: at Request. (/app/services/graph-api.js:250:20) 2020-10-29T07:06:32.457418+00:00 app[web.1]: at Request.emit (node:events:327:20) 2020-10-29T07:06:32.457418+00:00 app[web.1]: at Request.onRequestResponse (/app/node_modules/request/request.js:1059:10) 2020-10-29T07:06:32.457419+00:00 app[web.1]: at ClientRequest.emit (node:events:327:20) 2020-10-29T07:06:32.457419+00:00 app[web.1]: at HTTPParser.parserOnIncomingClient (node:_http_client:652:27) 2020-10-29T07:06:32.457419+00:00 app[web.1]: at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17) 2020-10-29T07:06:32.457420+00:00 app[web.1]: at TLSSocket.socketOnData (node:_http_client:518:22) 2020-10-29T07:06:32.457420+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20) 2020-10-29T07:06:32.457421+00:00 app[web.1]: at addChunk (node:internal/streams/readable:304:12) 2020-10-29T07:06:32.457421+00:00 app[web.1]: at readableAddChunk (node:internal/streams/readable:279:9) {"error":{"message":"(#100) Upload failed","type":"OAuthException","code":100,"error_subcode":2018007,"fbtrace_id":"A9dDNMK7-ze_mHtizEQCK5P"}} 2020-10-29T07:06:32.457527+00:00 app[web.1]: { Daniel: undefined, Jorge: undefined } 2020-10-29T07:06:32.488979+00:00 app[web.1]: Unable to create a persona: Error: 400 2020-10-29T07:06:32.488982+00:00 app[web.1]: at Request. (/app/services/graph-api.js:250:20) 2020-10-29T07:06:32.488982+00:00 app[web.1]: at Request.emit (node:events:327:20) 2020-10-29T07:06:32.488983+00:00 app[web.1]: at Request.onRequestResponse (/app/node_modules/request/request.js:1059:10) 2020-10-29T07:06:32.488983+00:00 app[web.1]: at ClientRequest.emit (node:events:327:20) 2020-10-29T07:06:32.488983+00:00 app[web.1]: at HTTPParser.parserOnIncomingClient (node:_http_client:652:27) 2020-10-29T07:06:32.488984+00:00 app[web.1]: at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17) 2020-10-29T07:06:32.488984+00:00 app[web.1]: at TLSSocket.socketOnData (node:_http_client:518:22) 2020-10-29T07:06:32.488985+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20) 2020-10-29T07:06:32.488985+00:00 app[web.1]: at addChunk (node:internal/streams/readable:304:12) 2020-10-29T07:06:32.488986+00:00 app[web.1]: at readableAddChunk (node:internal/streams/readable:279:9) {"error":{"message":"(#100) Upload failed","type":"OAuthException","code":100,"error_subcode":2018007,"fbtrace_id":"Azjf31i7x3zPm8BeSjMQXT2"}} 2020-10-29T07:06:32.489153+00:00 app[web.1]: { Daniel: undefined, Jorge: undefined, Laura: undefined } 2020-10-29T07:06:32.534736+00:00 app[web.1]: Request sent: { 2020-10-29T07:06:32.534743+00:00 app[web.1]: error: { 2020-10-29T07:06:32.534744+00:00 app[web.1]: message: '(#11) Setting of Nested Persistent Menu has been deprecated for v8.0 and higher',
2020-10-29T07:06:32.534745+00:00 app[web.1]: type: 'OAuthException', 2020-10-29T07:06:32.534745+00:00 app[web.1]: code: 11, 2020-10-29T07:06:32.534746+00:00 app[web.1]: fbtrace_id: 'AHhD6jUM6ARRq8Fkxx5vPub' 2020-10-29T07:06:32.534746+00:00 app[web.1]: } 2020-10-29T07:06:32.534746+00:00 app[web.1]: } 2020-10-29T07:06:32.555942+00:00 app[web.1]: Unable to create a persona: Error: 400 2020-10-29T07:06:32.555944+00:00 app[web.1]: at Request. (/app/services/graph-api.js:250:20) 2020-10-29T07:06:32.555944+00:00 app[web.1]: at Request.emit (node:events:327:20) 2020-10-29T07:06:32.555945+00:00 app[web.1]: at Request.onRequestResponse (/app/node_modules/request/request.js:1059:10) 2020-10-29T07:06:32.555945+00:00 app[web.1]: at ClientRequest.emit (node:events:327:20) 2020-10-29T07:06:32.555946+00:00 app[web.1]: at HTTPParser.parserOnIncomingClient (node:_http_client:652:27) 2020-10-29T07:06:32.555946+00:00 app[web.1]: at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17) 2020-10-29T07:06:32.555947+00:00 app[web.1]: at TLSSocket.socketOnData (node:_http_client:518:22) 2020-10-29T07:06:32.555947+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20) 2020-10-29T07:06:32.555949+00:00 app[web.1]: at addChunk (node:internal/streams/readable:304:12) 2020-10-29T07:06:32.555950+00:00 app[web.1]: at readableAddChunk (node:internal/streams/readable:279:9) {"error":{"message":"(#100) Upload failed","type":"OAuthException","code":100,"error_subcode":2018007,"fbtrace_id":"A-jUFj2JM3yorQNoxtJHoXq"}} 2020-10-29T07:06:32.556053+00:00 app[web.1]: { 2020-10-29T07:06:32.556054+00:00 app[web.1]: Daniel: undefined, 2020-10-29T07:06:32.556054+00:00 app[web.1]: Jorge: undefined, 2020-10-29T07:06:32.556054+00:00 app[web.1]: Laura: undefined, 2020-10-29T07:06:32.556055+00:00 app[web.1]: Riandy: undefined 2020-10-29T07:06:32.556055+00:00 app[web.1]: }

Also when I send message to FB Page, Nothing happen.

To Reproduce

Steps to reproduce the behavior:

  1. Go to heroku and deploy sample app
  2. Click on the link: https://xxxxxxx.herokuapp.com/profile?mode=all&verify_token=
  3. Send message to page but got no response.
  4. See error: above

Expected behavior

When sending message to Page, Page should response.

sivasadanam commented 3 years ago

Same issue facing ..

{} Creating a Persona for app 8656636....5 Creating a Persona for app 86566....183 Creating a Persona for app 86....375 Creating a Persona for app 86566......375 Request sent: {"success":true} Request sent: { error: { message: '(#11) Setting of Nested Persistent Menu has been deprecated for v8.0 and higher', type: 'OAuthException', code: 11, fbtrace_id: 'ARQhZru2cefeL3DyzXnUpJX' } } Unable to create a persona: Error: 400 at Request. (/media/anish/New Volume/ReactProjects/original-coast-clothing/services/graph-api.js:250:20) at Request.emit (events.js:314:20) at Request.onRequestResponse (/media/anish/New Volume/ReactProjects/original-coast-clothing/node_modules/request/request.js:1066:10) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9) [ <Buffer 7b 22 65 72 72 65 6e 74 ... 576 more bytes> ] { Laura: undefined } Unable to create a persona: Error: 400 at Request. (/media/anish/New Volume/ReactProjects/original-coast-clothing/services/graph-api.js:250:20) at Request.emit (events.js:314:20) at Request.onRequestResponse (/media/anish/New Volume/ReactProjects/original-coast-clothing/node_modules/request/request.js:1066:10) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9) [ <Buffer 7b 22 65 72 1 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... 576 more bytes> ] { Laura: undefined, Riandy: undefined } Unable to create a persona: Error: 400 at Request. (/media/anish/New Volume/ReactProjects/original-coast-clothing/services/graph-api.js:250:20) at Request.emit (events.js:314:20) at Request.onRequestResponse (/media/anish/New Volume/ReactProjects/original-coast-clothing/node_modules/request/request.js:1066:10) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b 22 6d 65 73 73 67 65 20 63 6f 75 6c 64 6e 27 74 20 62 65 20 73 65 6e 74 ... 576 more bytes> ] { Laura: undefined, Riandy: undefined, Daniel: undefined } Unable to create a persona: Error: 400 at Request. (/media/anish/New Volume/ReactProjects/original-coast-clothing/services/graph-api.js:250:20) at Request.emit (events.js:314:20) at Request.onRequestResponse (/media/anish/New Volume/ReactProjects/original-coast-clothing/node_modules/request/request.js:1066:10) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9) [ <Buffer 7b 22 65 72 72 6f 72 22 3a 7b5 73 73 61 674 20 62 65 20 73 65 6e 74 ... 576 more bytes> ] { Laura: undefined, Riandy: undefined, Daniel: undefined, Jorge: undefined } Missing the environment variable

wanderingstan commented 3 years ago

@thangphamnd123 I am unable to repro this. Are you still having this issue?

Barbog commented 3 years ago

This may be related to the European privacy laws. My own bots do not show personas either. https://developers.facebook.com/docs/messenger-platform/europe-japan-updates

Barbog commented 3 years ago

Closing as the Persona calls are known to not be working in certain regions. This is intended to be resolved within the next month or so. Will re-open this should the issue be ongoing by mid-July.