ShipStation label generation fails with 500 NullReferenceException (duplicate Stamps.com carrier) #27
Open
opened 2026-06-29 08:36:10 +00:00 by rob
·
0 comments
Labels
Clear labels
Amazon SP-API
bug
Doing
eBay API
FBA Restock
FBA Restock
FBA Restock
fulfillment
Planning
Planning
Planning
Planning
Planning
prod
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
QA
shipstation
shipstation
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rob/estack-laminas#27
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Generating shipping labels via ShipStation fails for the Stamps.com carrier.
ShipStation's V1
POST /shipments/createlabelreturns HTTP 500System.NullReferenceExceptionfor every request, whilegetrateswith theidentical carrier/service/address/weight succeeds. No label is ever produced.
Reproduced on prod (
primabrands-llc) and locally (cb).Impact
Missing parameter "id"(Laminas
Segment::buildPath) because the empty print job had a null id.Reproduction
Investigation — ruled out (it is NOT our request)
testLabel: truevsfalse(real label)dimensions(bogus 1x1x1cm, removed, or real inches)shipTo.phonenull vs setlistservices/listpackages, andgetratessucceedsgetratesreturns rates with identical datagetrates-> 200;createlabel-> 500 NRE, no matter what we send. The failureis in ShipStation's label-purchase path, server-side
(
SS.OpenApi...ShipmentsController._CreateLabel line 238).Root cause (strong suspect)
The ShipStation account has two Stamps.com carriers, both with
code: stamps_com:Our DB (
ShipStationCarrier.id = 1,code = stamps_com_382984,ss_code = stamps_com) is bound to the non-primary account (382984). We sendthe ambiguous
carrierCode: stamps_com; rating tolerates the ambiguity butcreatelabelcannot resolve which Stamps.com account to buy from and NREs.Remediation
re-sync carriers so
carrierCode: stamps_comis unambiguous.ShipStationCarrierrow at the primary provider and send adisambiguated
carrierCode(stamps_com_493397). Needs a probe to confirm V1accepts the suffixed code.
ShipStationGenerator::createLabel()to translate a5xx/NRE into a readable operator message instead of leaking the .NET stack trace.
captured request +
_CreateLabel line 238stack trace (unhandled bug on their side).Already fixed in this branch (jv-fix)
GeneratePickListTask: redirect uses the first persisted print job; empty-jobcase no longer passes a null
id(fixesMissing parameter "id"crash).GeneratePickListTask+BackgroundController+ShipmentsController: empty jobredirects back to Pick & Pack with an "Unable to generate the label" flash.
ShipStationGenerator: log path/tmp/shipstation.log->data/logs/shipstation.log(the
/tmppath was unwritable on prod, which had hidden the request/response).