How to export blender file with armature to glb
Start by trying the latest stable version, Blender 2.81a.  If that fails, make a backup of your project and try downloading an "Experimental" build of 2.82 from: https://builder.blender.org/download/

The reason I suggest this is that many armature-related bugs and issues have been corrected over the last 6 months or so in the glTF exporter, and not all of those fixes have yet made it out into a stable release of Blender as of this writing.  Several new fixes will be released with 2.82.

One other option to consider, if this really is a mechanical robotic arm that does not move in a cartoonish or organic way:  You could get rid of the bones and armature, and just have each mechanical section of the arm be its own object, parented to the one above.  Then you can use traditional node-based animations, instead of bones and armatures that are meant for more organic movements.  The robotic arm could have a specific shoulder joint with a specific elbow joint as its child, and the object movements would be animated object position/rotations that should export correctly to glTF.