Provided you have a suitable and serviceable GPS antenna connected to the AIS, lack of GPS signal can be caused by factors such as installation location or even environmental factors.
The best rule of thumb to remember is that the GPS antenna should be mounted as high as possible (do not mount on the top of a high mast though as the motion of the vessel will cause the antenna to swing and potentially reduce the accuracy of the GPS position), with a clear view of the sky above and out of the direct path of RADAR or satellite communication antennas.
Please also remember that the AIS will only get a position fix when connected to its own GPS antenna. Due to regulatory reasons, it is not possible to input a GPS signal from another GPS receiver (for instance a GPS receiver already supplying GPS data on a vessels NMEA network).