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

api-kit methods throw error with 404 and CORS #1159

Open
choi-youjin opened this issue Mar 4, 2025 · 6 comments
Open

api-kit methods throw error with 404 and CORS #1159

choi-youjin opened this issue Mar 4, 2025 · 6 comments

Comments

@choi-youjin
Copy link

Description

  • When I call SafeApiKit.proposeTransaction method, it throws an error, and it's all just 404 for OPTIONS method and CORS error.
  • Same with SafeApiKit.getPendingTransactions call.
  • Maybe more but I cannot proceed testing others
  • It all worked well before, but our team found today that it now throws error and doesn't work. (No FE code changed)

Environment

  • Safe Core SDK versions:
    • api-kit: 2.5.11 (Same issue with 2.5.2)
    • protocol-kit: 5.2.4
    • relay-kit:
    • types-kit:
    • sdk-starter-kit:
  • Safe contract version:
  • Environment:
    • browser
    • non-browser

Steps to reproduce

If applicable, please provide a screenshot or small video reproducing the bug.
Provide as much information as necessary to reproduce the bug.

Expected result

Please describe concisely what you expect instead.

Additional context

Add any other context about the problem here.

@dahu33
Copy link

dahu33 commented Mar 6, 2025

Same here, it broke our product.

@kevtechi
Copy link

kevtechi commented Mar 6, 2025

Maybe due to the hack?

@dasanra
Copy link
Collaborator

dasanra commented Mar 6, 2025

Currently the Safe services are in lockdown mode, so the api-kit is not working as expected. They will be soon accesible, we will notify you in this issue when they are available.

@iamgauravpant
Copy link

please resume your services soon :)

Safe Transaction Service is critical for our product

@jdt3969
Copy link

jdt3969 commented Mar 7, 2025

I also ran into this issue and I think the services are up but they made a breaking change to the api by prefixing /api/ to their routes so the example in the readme should actually now be:

import SafeApiKit from '@safe-global/api-kit'

const apiKit = new SafeApiKit({
  chainId: 1n,
  // Optional. txServiceUrl must be used to set a custom service. For example on chains where Safe doesn't run services.
  txServiceUrl: 'https://safe-transaction-mainnet.safe.global/api'
})

Hope this helps

@dasanra
Copy link
Collaborator

dasanra commented Mar 10, 2025

API Services are running normally now, you shouldn't face any issues.

@jdt3969 it's true there is a small error in the README, will fix that too.

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

6 participants