Appearance
Troubleshooting
For merchants
Logs
var/log/kmh_lastmiledelivery_<env>.log (rotating, 7 files). Errors are always written. Switch on Enable debug logging under All Sales Channels in the configuration to also see warnings and info: every map request and response, why Instant Delivery could not be priced (Instant Delivery could not be priced. with reason), codes issued and photos attached. The delivery code itself is never logged; the Google API key is masked.
Checkout errors
Every address: "We could not determine the delivery distance"
Work through these in order; each has a log line:
| Log | Fix |
|---|---|
Delivery origin is not configured; cannot compute distance. (warning) | Set Fulfilment latitude and Fulfilment longitude for this storefront (or All Sales Channels). |
Configured map provider is unknown. (error) | Choose OpenStreetMap or Google Maps again and save. |
Google Maps API key is not configured; distance/geocoding will fail until it is set. (error) | Enter the key, or switch to OpenStreetMap. |
Google Maps geocoding returned status "REQUEST_DENIED". This is a configuration/authorization error… (error; also for distance matrix, OVER_DAILY_LIMIT, INVALID_REQUEST) | In the Google Cloud console: enable the Geocoding API and Distance Matrix API, check billing and the key's restrictions. See Google Maps. |
Map provider could not resolve a distance. (warning) with Nominatim request failed: …, OSRM request failed: …, OSRM code: … or Google Maps request failed: … | The map server is unreachable, too slow (3 s / 5 s time-out) or refused the request. On the public OpenStreetMap servers this is often rate limiting — host your own. |
One address only: "We could not determine the delivery distance"
Log: Delivery address could not be geocoded., often after Google geocoding result too imprecise to deliver to. or Nominatim result too imprecise to deliver to. The address was matched only to an area (postcode, city, country), not a street. The customer needs to correct the street. The not found result is remembered for 1 hour, so a corrected entry of the same text is not retried before then — a changed address is looked up straight away.
"Please enter a complete delivery address (street and city)…"
Street or city of the shipping address is empty.
"Instant Delivery is not available for your address"
A distance was found, but:
- no active rule matches — check the ranges: To is exclusive, so 20 km doesn't match 0 to 20; the cart's weight, size, item count or order value may fall outside every rule; a Rule Builder scope may not apply;
- or the first matching rule has no price row for this storefront and no default row. Lower rules are not tried. Give each rule a default price row.
A rule without conditions at the lowest priority catches everything that remains. See Price rules.
Checkout fails with an error page after choosing Instant Delivery
Check Fulfilment latitude / longitude: a latitude outside −90…90 or a longitude outside −180…180 (often latitude and longitude swapped) is not caught and breaks the cart calculation. See the Shopware log for Latitude … is out of range [-90, 90]. or Longitude … is out of range [-180, 180].
Prices
| Symptom | Cause / fix |
|---|---|
| Delivery cost in another currency is off | Prices entered in the Administration are in the default currency and converted with the currency factor. Check the factor under Settings → Shop → Currencies. |
| Net customers see a different amount | Net and tax-free customers are charged the rule's net price. |
| A surcharge doesn't appear | Check active, validity window, sales channels, Rule Builder scope, conditions and periods. Times are judged in the Fulfilment timezone (default UTC) — a peak window in local time with the timezone left on UTC is shifted. A fixed surcharge without a price for the storefront is skipped. |
| Peak surcharge missing exactly at the end time | The end minute is outside the window (17:00–20:00 ends before 20:00). |
| The cost doesn't change after editing a placed order | Intended: orders edited in the Administration keep their shipping cost. |
| Distances seem outdated after moving the fulfilment location | They aren't: the cache is per location. After a change at the map service, clear the cache (bin/console cache:clear). |
Saving rules and surcharges
| Message | Fix |
|---|---|
| Another active rule already uses this priority… | Give each active rule its own priority. New rules start at 0. |
| A condition range is invalid… | To must be greater than From; no negative values. |
| Each metric can only be used once per rule. | Remove the second condition on the same metric. |
| There is more than one price for the same sales channel. | Remove the duplicate price row (only one default row allowed). |
| A percentage surcharge needs a percentage greater than 0. | Enter a positive percentage. |
| Period times must use 24-hour HH:MM format. | Use 08:00, not 8:00 or 8am. |
Delivery verification
| Symptom | Cause / fix |
|---|---|
| Card: Not in transit yet | The code is generated when the delivery status is set to In transit. |
| Card: Delivery verification disabled | Enable delivery OTP and Enable proof of delivery image are both off (under All Sales Channels). |
| No code form although the delivery is in transit | OTP was off when it went in transit, or the order already had a verification record — e.g. a photo — so no code was generated. Turn OTP on and use Resend code via the API, or verify by photo. |
| Customer didn't get the code email | Check the flow Delivery OTP: order on its way is active, Shopware's mailer works, and the order has a customer email. Then Resend code. |
| Too many attempts. The code is locked. | Resend code issues a new one. |
| This code has expired. | Resend code; consider a longer OTP validity. |
| Photo refused: uploaded before the order was placed | Upload a new photo instead of selecting one from the media library. |
| Photo refused: not an image | Only image files are accepted. |
| Verified, but the delivery stays In transit | Set order state to shipped on verification is off, or the requirement also needs a photo (OTP and proof…), or, with OTP off, the requirement is still OTP only. The log shows Ship transition not available from the current delivery state… when the status can't move to Shipped. |
| Photo saved, no delivery confirmed email | Intended: that email is sent only for a verified code. See Emails and flows. |
| A user with the plugin permission gets an error on verify | Open the role, check Last-Mile Delivery for Shopware 6 → Manage is ticked and save it again after updating the plugin. |
| Code generated on a parcel-carrier order | In transit works for every order; avoid it for carrier orders or adjust the flow. |
After uninstalling
The In transit status stays if any delivery is in it or its history mentions it. That keeps those orders valid; it can't be used for new transitions once the plugin is gone.
Known issues
In version 0.9.0-beta.2:
| Issue | Impact | Workaround |
|---|---|---|
| Debug logging and the Delivery verification card read the All Sales Channels settings only. | Per-storefront values for logging and for what the card shows have no effect. | Set them under All Sales Channels. |
| Out-of-range fulfilment coordinates are not validated. | Instant Delivery checkout fails with an error instead of a message. | Enter valid coordinates. |
| A photo-only confirmation sends no delivery confirmed email. | Customers aren't told. | Flow on the delivery status Shipped. |
| Updating or activating the plugin resets the Instant Delivery name, active flag, tax type and delivery time and links it to every sales channel. | Your changes to the method are lost. | Re-check after each update. |
| The Administration's price fields edit the default currency only. | No per-currency price in the UI. | Rely on the currency factor, or set currency prices through the API. |
| The card evaluates the order's first delivery only. | Split orders show the first delivery's status. | — |
Still stuck? Contact support with versions and log lines.