Do you have any magnets on your fridge? Go get one and see if it will stick to your bike.

Does the compass work when it's not near your bike?