Why wont the code after getting the picture execute if the image source is (specifically) Photos but works fine if the source is camera?

I am making use of Ionic Capacitor with the Camera plugin to upload an image to my ionic app. After getting the image I want to store the base64 string in a variable. My problem is that this only works if the image source is the camera, and not if the image source is the Gallery/Photos.
Here is my code:

async selectImageSource() {
    const buttons = [
        text: "Take Photo",
        icon: "camera",
        handler: () => {
        text: "Gallery",
        icon: "image",
        handler: () => {

    const actionSheet = await this.actionSheetCtrl.create({
      header: "Select Image Source",
    await actionSheet.present();
  } // End of select image source

  async addImage(source: CameraSource) {
    console.log("I clicked on Gallery");
    const image = await Camera.getPhoto({
      quality: 60,
      allowEditing: true,
      resultType: CameraResultType.Base64,
    this.Logo = "data:image;base64," + image.base64String;
    // this.InjectImage();

In the addImage method, the console.log at the very bottom of the method will not show if the image source is Photos/Gallery, but it does show if the image source is the camera.

In the AddImage method, the firdt console.log does appear in the console (when I use the gallery/photos option) but the second console.log does not appear.

Are you certain no uncaught exceptions are being thrown?

I am very sure. The code just works for the camera option and does nothing for the gallery/photos option.

I just restarted my phone and it is working all of a sudden. Should I delete the post since there was not an actual problem?