A component shortage has prompted Foxconn to forecast a consumer electronics sales decline in the fourth quarter.