Got problem when test plugin in local environment

I’m having a problem with plugin local testing.
I got error that says “Failed to fetch localhost manifest. Check to ensure your localhost is running and your localhost server has CORS enabled.”

So, I also tried openai plugins quick start to what the problem is, and it throws same error.
Is there anyone who get this situation?

1 Like

Seems like a web server error. Try to see if you can view the manifest by browsing to http://localhost:5003/.well-known/ai-plugin.json

If not a good idea might be to upload your app on replit and give that URL to chatGPT.

Same problem. I’ve tried many days to connect to localhost but I can’t.

What browser are you using? Safari does not work for this, it has some weird local host issues.

1 Like

Have you seen this?

cURL commands to test TODO plugin server independent of ChatGPT

1 Like

I’m trying this in Brave and it doesn’t work, even with the plugin quickstart TODO app.

hey @hwb
are you using https in the manifest url for your local testing ? Maybe change it to http see if it works ?

You use could ngrok to create a tunnel between your backend and them. This will give you an URL you can use in ChatGPT to test your local server :slight_smile:

That’s what our users do at and it works fine :slight_smile:

I used chrome and also tried safari. Both don’t work.

Unfortunately, I used ‘http’ for local testing.

Oh really! I’ll try that one. Thanks for guide.

You’re welcome.

Also, regarding your localhost problem, be sure your server allows cross-origin request made from open-ai.

I don’t know what server you run, but for example on expressjs you can install the “cors” package to allows some cross origin requests.

I adjusted the code a bit and it worked for me.

import json
import quart
import quart_cors
from quart import request

app = quart.Quart(name)
app = quart_cors.cors(app, allow_origin=“*”)

_TODOS = {}“/todos/string:username”)
async def add_todo(username):
req_data = await request.get_json(force=True)
if username not in _TODOS:
_TODOS[username] =
return quart.Response(response=‘OK’, status=200)

async def get_todos(username):
return quart.Response(response=json.dumps(_TODOS.get(username, )), status=200)

async def delete_todo(username):
req_data = await request.get_json(force=True)
todo_idx = req_data[“todo_idx”]
if 0 <= todo_idx < len(_TODOS.get(username, )):
return quart.Response(response=‘OK’, status=200)

async def plugin_logo():
filename = ‘logo.png’
return await quart.send_file(filename, mimetype=‘image/png’)

async def plugin_manifest():
host = request.headers[‘Host’]
with open(“./.well-known/ai-plugin.json”) as f:
text =
return quart.Response(text, mimetype=“text/json”)

async def openapi_spec():
host = request.headers[‘Host’]
with open(“openapi.yaml”) as f:
text =
return quart.Response(text, mimetype=“text/yaml”)

def main():, host=“”, port=5003)

if name == “main”: