Skip to content

DrupalGap 7.x CORS? Whitelist? Ajax call errors #1037

@gs999918

Description

@gs999918

Aloha,

I am trying to keep my app alive, at this point. The modules are not loading on the Ajax call to load them, and instead throwing errors that they cannot be loaded. For your reference, below is the code snippet that is failing. This is for Cordova 10.0.0 cli and the corresponding iOS and Android versions that go with the new cli version.

Off the top of our heads, why would this be happening? --All sources point to the fact that this is a CORS or whitelist error. I know @signalpoint may have some advice, because he was working with DrupalGap on various live projects. Is this going to be the end of Drupalgap 7, or is this indeed something that can be configured with CORS and whitelist error resolution? Is anyone running into this issue? Just last DEC, 2020 everything was running fine on Cordova 9.0.0 and its corresponding iOS and Android versions. Any advice/comments would be welcome.

Thanks,

GS

 // Now load all the paths for this module.
            for (var modules_paths_index in modules_paths) {
                if (!modules_paths.hasOwnProperty(modules_paths_index)) { continue; }
                var modules_paths_object = modules_paths[modules_paths_index];
                jQuery.ajax({
                    async: false,
                    type: 'GET',
                    url: modules_paths_object,
                    data: null,
                    success: function() {
                      if (Drupal.settings.debug) { console.log(modules_paths_object); }
                    },
                    dataType: 'script',
                    error: function(xhr, textStatus, errorThrown) {
                      console.log(
                          t('Failed to load module!') + ' (' + module.name + ')',
                          textStatus,
                          errorThrown.message
                      );
                    }
                });
            }
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions