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

Error: forefront create account failed #12

Open
Jayajy opened this issue May 8, 2023 · 10 comments
Open

Error: forefront create account failed #12

Jayajy opened this issue May 8, 2023 · 10 comments

Comments

@Jayajy
Copy link

Jayajy commented May 8, 2023

I didn't use Docker to package the project. I ran Yarn Start locally and reported an error when using the following command:
curl " http:https://127.0.0.1:3000/ask?prompt=hello&model=forefront&gptmodel=gpt -4&resignup=1"
I am not very familiar with typescript language and cannot debug any errors. Can you provide me with some help? Thank you!
The error message is as follows:
yarn run v1.22.19 $ ts-node index.ts Now listening: 127.0.0.1:3000 Error: forefront create account failed at Forefront.<anonymous> (/home/gpt4free-ts-master/model/forefront/index.ts:230:19) at Generator.next (<anonymous>) at fulfilled (/home/gpt4free-ts-master/model/forefront/index.ts:5:58)

@xiangsx
Copy link
Owner

xiangsx commented May 8, 2023

have config rapid_api_key in .env?
if config , retry.

@Jayajy
Copy link
Author

Jayajy commented May 8, 2023

Is the. env file created in the root directory of the project?
I created it before, but I reported an error with no API, so I directly wrote the API into emailFactory.ts.
Is it valid to create. env without executing the docker?

@xiangsx
Copy link
Owner

xiangsx commented May 8, 2023

no,
try this cmd
rapid_api_key=xxxx yarn start

@DaYzTm
Copy link

DaYzTm commented May 8, 2023

Same thing, api key is present, but he complains that he can not create an account.

@wangmt2000
Copy link

wangmt2000 commented May 9, 2023

Now listening: 127.0.0.1:3000
Error: Failed to create account! sign email res parse token failed!
at Forefront. (/usr/src/app/model/forefront/index.ts:220:19)
at Generator.next ()
at fulfilled (/usr/src/app/model/forefront/index.ts:5:58)

then i set rapid_api_key=token , i get

Now listening: 127.0.0.1:3000
AxiosError: Request failed with status code 403
at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:570:11)
at IncomingMessage.emit (node:events:525:35)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/json',
'X-RapidAPI-Key': '3Sk-wlCW4Q6lQ5pBJed9',
'X-RapidAPI-Host': 'temp-mail44.p.rapidapi.com',
'User-Agent': 'axios/1.4.0',
'Content-Length': '2',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
baseURL: 'https://temp-mail44.p.rapidapi.com/api/v3/email/',
method: 'post',
url: '/new',
data: '{}'
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
finish: [Function: requestOnFinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '2',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'temp-mail44.p.rapidapi.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'temp-mail44.p.rapidapi.com',
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *1],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 15,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_header: 'POST /api/v3/email/new HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/json\r\n' +
'X-RapidAPI-Key: 3Sk-wlCW4Q6lQ5pBJed9\r\n' +
'X-RapidAPI-Host: temp-mail44.p.rapidapi.com\r\n' +
'User-Agent: axios/1.4.0\r\n' +
'Content-Length: 2\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: temp-mail44.p.rapidapi.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/api/v3/email/new',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [Array],
rawTrailers: [],
joinDuplicateHeaders: undefined,
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 403,
statusMessage: 'Forbidden',
client: [TLSSocket],
_consuming: true,
_dumped: false,
req: [Circular *1],
responseUrl: 'https://temp-mail44.p.rapidapi.com/api/v3/email/new',
redirects: [],
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 16,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'temp-mail44.p.rapidapi.com',
protocol: 'https:',
_redirectable: Writable {
_writableState: [WritableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 2,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: 'https://temp-mail44.p.rapidapi.com/api/v3/email/new',
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'x-rapidapi-key': [Array],
'x-rapidapi-host': [Array],
'user-agent': [Array],
'content-length': [Array],
'accept-encoding': [Array],
host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 403,
statusText: 'Forbidden',
headers: AxiosHeaders {
date: 'Tue, 09 May 2023 01:59:48 GMT',
'content-type': 'application/json',
'transfer-encoding': 'chunked',
connection: 'close',
'x-rapidapi-version': '1.2.8',
'x-rapidapi-region': 'AWS - us-east-1',
'x-rapidapi-proxy-response': 'true',
server: 'RapidAPI-1.2.8'
},
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
baseURL: 'https://temp-mail44.p.rapidapi.com/api/v3/email/',
method: 'post',
url: '/new',
data: '{}'
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '2',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'POST /api/v3/email/new HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/json\r\n' +
'X-RapidAPI-Key: 3Sk-wlCW4Q6lQ5pBJed9\r\n' +
'X-RapidAPI-Host: temp-mail44.p.rapidapi.com\r\n' +
'User-Agent: axios/1.4.0\r\n' +
'Content-Length: 2\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: temp-mail44.p.rapidapi.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/api/v3/email/new',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'temp-mail44.p.rapidapi.com',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kUniqueHeaders)]: null
},
data: { message: 'You are not subscribed to this API.' }

@xiangsx
Copy link
Owner

xiangsx commented May 9, 2023

@NgWaiKong
Copy link

NgWaiKong commented May 9, 2023

hi, i updated and set up the rapid_api_key, but still met a failure:

Error: Failed to create account! sign email res parse token failed!
    at Forefront.<anonymous> (/Users/xx/Workspace/github/gpt4free-ts/model/forefront/index.ts:221:19)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/xx/Workspace/github/gpt4free-ts/model/forefront/index.ts:5:58)

do you have any ideas?

@xiangsx
Copy link
Owner

xiangsx commented May 9, 2023

the same to #20 (comment)

try this

@Irfanshah33
Copy link

Based on the error message you provided, it seems that there is an issue with creating an account in the Forefront module of the project. The error originates from the index.ts file in the /model/forefront directory.

To troubleshoot this issue, you can follow these steps:

  1. Check the index.ts file: Open the /model/forefront/index.ts file in your code editor and navigate to line 230, where the error occurs. Review the code around that line and check for any potential issues or inconsistencies.

  2. Verify Forefront account credentials: Ensure that you have the necessary account credentials for Forefront. If you haven't created an account yet, you might need to sign up for Forefront and obtain the required API keys or access tokens. Double-check that the account credentials are correctly set up in your code.

  3. Confirm network connectivity: Ensure that your local development environment has internet connectivity and can reach the Forefront service. Sometimes network issues can cause failures when creating an account or accessing external services. Check your network connection and firewall settings to ensure they are not blocking any outgoing requests.

  4. Debug and logging: Add additional logging statements or debug breakpoints in the index.ts file to understand the flow of execution and identify any potential issues. You can log relevant variables, function outputs, or any error messages to help you pinpoint the problem. This will help you gather more information about the error and potentially narrow down the root cause.

  5. Review Forefront documentation: Consult the documentation or resources provided by Forefront to ensure that you are using the correct API endpoints, authentication methods, and any other requirements specific to the service. It's possible that there may be additional configuration or setup steps you need to follow.

  6. Seek community or official support: If you are still unable to resolve the issue, consider reaching out to the project's community or official support channels for further assistance. They may be able to provide more specific guidance based on the project's context and codebase.

By following these steps, you should be able to gather more information about the error and potentially identify the cause of the "forefront create account failed" issue.
Best things to do in nyc

@IdaBruce
Copy link

wow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@NgWaiKong @xiangsx @wangmt2000 @Jayajy @DaYzTm @Irfanshah33 @IdaBruce and others