Troubleshooting
“Test connection” or “Connect” fails
Section titled ““Test connection” or “Connect” fails”- The contact e-mail is required: Melhor Envio asks for it in the User-Agent. Without it no request is sent.
- The callback of your Melhor Envio application must be exactly the address shown on the Connection page (the same scheme, host and path). A difference gives “Client invalid” at Melhor Envio.
- Test credentials only work in test mode and production credentials only in live mode; they are two separate applications.
- The Log tab shows the answer of Melhor Envio (masked). HTTP 401 “Unauthenticated” means the authorization expired or was revoked; the add-on renews it once by itself, and when the renewal is rejected it stops and asks you to connect again.
- Your server must reach Melhor Envio over HTTPS (outgoing port 443) and have a current CA bundle.
No Melhor Envio method at checkout
Section titled “No Melhor Envio method at checkout”- The customer’s country must be Brazil with a valid 8 digit CEP, and the sender CEP (Connection page) or the origin address of the store must be set.
- The store needs a BRL currency (a secondary one is enough). Without it the add-on cannot convert the prices and offers nothing.
- A service that the carrier cannot serve to that CEP is not offered; the log keeps the answer of Melhor Envio.
- After a failed quote the methods stay hidden for 30 seconds and the failure is logged.
Label problems
Section titled “Label problems”- “The recipient CPF / CNPJ is missing or not valid”: type the number in the form. A CNPJ may contain letters (the alphanumeric CNPJ).
- Not enough balance: Melhor Envio refuses the payment; the label stays in the cart. Add balance in Melhor Envio and press Pay and generate.
- Commercial shipments need the sender CNPJ, the state registration and a valid 44 character NF-e key.
- Correios, J&T and Loggi accept one volume per label: create one label per package (tick Additional package).
- “Creating (unclear)”: see Usage, “When the answer is lost”.
Nothing happens after an order changes status
Section titled “Nothing happens after an order changes status”- Check Settings > General > Enable and the order status settings.
- Check the license status bar on the add-on pages.
- Open Jobs: queued jobs wait for cron. If the counts never change, the cron job is not running; run the command from the settings page by hand once.
A job is “Waiting to retry” or “Gave up”
Section titled “A job is “Waiting to retry” or “Gave up””The last error is shown in the list. Fix the cause (data, authorization, Melhor Envio outage) and press Retry. Jobs are retried automatically after 5 minutes, 15 minutes, 1 hour, 3 hours and 12 hours before they give up.
Webhooks are rejected
Section titled “Webhooks are rejected”- The webhook is signed with your application’s secret: the Connection page must hold the secret of the same mode.
- The web address must be the one on the Connection page, reachable from the internet and not behind a login or an IP filter. Melhor Envio waits 6 seconds and retries 5 times, 15 minutes apart; the add-on stores the event and answers at once.
- Webhooks only fire for labels made with the same application.
- Rejected events are listed in the log with the action “webhook”.
The cron address answers “Forbidden”
Section titled “The cron address answers “Forbidden””The key in the address is wrong. Copy the address again from the settings page.
Still stuck
Section titled “Still stuck”Contact us through https://cs-cart.kaviolabs.com with the add-on version, the CS-Cart version and the relevant log lines (secrets and personal data are masked automatically).