Skip to content

Frequently Asked Questions

How do I handle errors when I submit a Flag?#

Are you using an older version of Crucible? If you used Crucible prior to October 22 2024, some saved notebooks may fail due to a change in the URLs.

All Challenges follow a similar pattern to validate your submissions against the API. You may encounter errors when you attempt to solve a Challenge. Depending on the error or response code, follow the dedicated guidance:

  • Check the API endpoint and method
    • Ensure the correct URL by double-checking the API endpoint to confirm it's accurate and accessible.
    • Verify that you are using the correct HTTP method (GET, POST, PUT, DELETE) for the API call.
  • Inspect request headers and payload
    • Headers: Ensure you include and correctly set all necessary headers (for example, Content-Type, Authorization).
    • Payload: Verify that you format the request payload (body) correctly, especially when using JSON. Use json.dumps() to convert Python dictionaries to JSON strings if needed.
  • Use a REST client for testing
    • Postman or cURL: Use tools like Postman or cURL to manually test the API endpoint. This helps you isolate whether the issue lies with the code or the API itself.
  • Check for errors in the response
    • Status Codes: Check the HTTP status codes returned by the API. Common codes include 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), and 500 (Internal Server Error).
    • Error Messages: Read any error messages or details in the response body to understand what could be causing the error.
  • Debugging in Jupyter notebooks
    • Print statements: Use print statements to display the request and response details for debugging.
    • Cell execution order: Ensure you execute the cells in the correct order, as Jupyter notebooks maintain state between cells.
    • Familiarize yourself with Python errors.
  • Network and connectivity
    • Internet connection: Ensure that there is a stable internet connection.
    • Firewall/Proxy: Check if a firewall or proxy might be blocking the request.
  • Logging and Error Handling
    • Logging: Implement logging to capture request and response details.
    • Exception handling: Use try-except blocks to handle exceptions and print error details.
  • Adding debugging and printing of payloads to your python code snippets for HTTP calls, IE:

    • Using requests library:
    import requests
    import json
    
    def query(input_data):
        # Print request details
        print(f"\n=== Request Details ===")
        print(f"URL: {CHALLENGE_URL}/score")
        print(f"Headers: {json.dumps({'X-API-Key': 'XXXX-XXXX'}, indent=2)}")
        print(f"Payload: {json.dumps({'data': input_data}, indent=2)}")
    
        try:
            response = requests.post(
                f"{CHALLENGE_URL}/score",
                headers={"X-API-Key": CRUCIBLE_API_KEY},
                json={"data": input_data}
            )
    
            # Print response details
            print(f"\n=== Response Details ===")
            print(f"Status Code: {response.status_code}")
            print(f"Response Headers: {json.dumps(dict(response.headers), indent=2)}")
            print(f"Response Body: {json.dumps(response.json(), indent=2)}")
    
            return response.json()
        except requests.exceptions.RequestException as e:
            print(f"\n=== Error ===")
            print(f"Request failed: {str(e)}")
            raise
    
    query("send your text inputs here?")
    
  • Consult documentation

  • Platform guidelines: Check any platform-specific guidelines for common issues.

  • Community and support

  • Forums and support: Reach out to community forums or support channels for help if the issue persists.

What is my flag is marked as incorrect?#

Flags are dynamically computed values and do not work across user accounts (nice try!). The final flag you capture in a Challenge begins with gAAAAA ... and should be ~200 character count, if you believe the response is an error, common errors can be formatting from copying and pasting, erroneous quotation marks etc.

Hint: Some challenges related to system prompt extraction or where the model can hallucinate may not always give you the full flag value, try harder!

If you've tried all of the troubleshooting methods and are still stuck, contact us directly in our Dreadnode Discord channel.