First it is not an error but a warning. Thus is allowable.
Second, as a general rule the count of individuals per bin should be greater than 5 for the chi sq test. Most of your bins have only 0 or 1 in them. So either add multiple bins together to exceed 5 or use another test such as the Fisher's Exact test: fisher.test().