The camera needs to be set to function without a EF-M Mount lens attached. If you do not have access to your physical manual and cannot find one online, you can refer to the guide below: 


EOS M, EOS M2: 


1) In the fourth Set-up menu, select "Custom Functions (C.Fn)"

2) In the Custom Function Setting IV (C.Fn IV: Operations/Others) category, navigate to "Release shutter w/o lens" and select it

3) Select "1: Enable"


EOS M50:


1) In the fifth Set-up menu, select "Custom Functions (C.Fn)"

2) Navigate to "Release shutter w/o lens" and select it

3) Select "1: Enable"



EOS M3, EOS M5, EOS M6, EOS M10:


1) In the Custom Functions menu, select "C.Fn III: Others"

2) Navigate to "Release shutter w/o lens" and select it

3) Select "1: Enable"


EOS M100:


1) In the Custom Functions menu, select "C.Fn II: Others"

2) Navigate to Release shutter w/o lens" and select it

3) Select: "1: Enable"