To check whether it was just a problem of file corruption, I made a new map (empty) and I embedded my tilesets to it, save it, close the file and open it. This leads to the same crash and same error message.
What is funny is that if I export the map in json before to close it, the json map work perfectly in Phaser.
This means there may be some inconsistency in the map reader and writer, or between the data and the verification checks done in the map reader. The error messages pops up if this check fails:
It would be very helpful if you could upload the files you’re using to reproduce the problem (see the Upload button in the post tool bar).
No problem, that really helped! Indeed the file was invalid and I found out how this happened. When you embed a tileset, it is internally cloned to avoid affecting the external tileset with further edits, but the cloning of Wang sets was incomplete. I fixed it in the following change:
It will be included in a future Tiled 1.1.4 release and the next development snapshot.