Most of the time I've crossed borders without difficulty. If anything at least as much fun with fees/inspections coming from travel itself, e.g. inspections of the bicycle box or extra baggage fees.
In quite a few border crossings, the only ones that stick in my memory:
1) I hadn't paid enough attention and accidentally tried flying into China on an expired Visa. My airline hadn't noticed and hence immigration in Beijing set me aside while it was sorted out. I wasn't allowed to enter the country and I was initially given two alternatives: (a) have the airline fly me back to my origination: Vladivostok or (b) fly back to my home country, USA. After some discussion and problem solving, I determined a third possibility (c) fly to Hong Kong and get a new visa there. More details here:
http://www.crazyguyonabike.com/doc/mevchina2007
2) I discovered that the border guards in crossing from Gronowo, Poland to Kaliningrad, Russia wouldn't allow bicycle riders across this crossing. We did some negotiation, problem solving and eventually border guards ended up helping me commandeer a ride from a mini-bus van. More details here:
http://www.bikerussia.com/2007/04/07...ner-of-russia/
3) Crossing the US/Canadian border is typically hassle-free, though one gets asked if you are bringing weapons into Canada. Crossing the border from Haines, AK to Haines Junction, YT one goes through some wild country and I was given a bit of mixed messages by the border guards as they asked if I was bringing in bear spray (I wasn't). On the one hand, I thought I was adhering to weapons policies where in some circumstances bear spray can be considered a weapon. I couldn't quite tell if the customs officials were checking to make sure I was obeying policy or if they were chiding me for being irresponsible in going into bear country without bear spray.
4) Crossing into the US towards Houlton, ME on a rainy day, I had guards decide they wanted to thoroughly check my panniers. So we did (and I didn't have anything for them to find). I also got a similar pull everything out of the panniers inspection at a small crossing from Ukraine to Russia near Sudzha. In the latter case, they got tired of it once a more inviting Mercedes came along.
5) In pre 9-11 days, I once accidentally entered the US at an airport without a passport. I had gone to do a loop taking the ferry from Portland, ME to Yarmouth, NS. I had crossed land/sea borders fine on my drivers licence. On my return, I flew back from Halifax to Portland via Boston. I had been naive in thinking flights from Canada were similar in that (at that time) only a drivers license was necessary. However, at Logan Airport flights from Canada were just like any other international flight and hence you went through the same customs. I was able to show a MA drivers license and it took some extended discussion with immigration but eventually they let me in.
Bike boxes do get opened, either by security in your absence or sometimes such as leaving Vietnam, being paged to come open and reseal the box. I travel with that in mind, and generally don't put extra stuff in the box with the bicycle. I pack with that in mind. The other thing to pay attention to is occasionally agricultural zones within a country. For example, one might be checked for carrying fruit into California or Tasmania or crossing from Northern Territory into Western Australia. Border crossings can also sometimes take some extra time.