HTMLunit - error: [MobX] Unable to access proxy

Currently, I am faced with a challenge in extracting data from a JavaScript-based website using htmlunit. My approach involves calling the site through webClient.getPage, but this method is triggering an exception.

    public static void main(String[] args) throws Exception {

        final WebClient webClient = new WebClient();

    webClient.getOptions().setThrowExceptionOnScriptError(false);
    webClient.setJavaScriptTimeout(10000);
    webClient.getOptions().setJavaScriptEnabled(true);
    webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    webClient.getOptions().setTimeout(10000);

    final HtmlPage page1 = webClient.getPage("[my-site-url-here]");


}

The exception I am encountering is as follows:

    ======= EXCEPTION START ========
Exception class=[net.sourceforge.htmlunit.corejs.javascript.JavaScriptException]
com.gargoylesoftware.htmlunit.ScriptException: Error: [MobX] Proxy not available (https://[my-site-here]/static/js/8.107d4023.chunk.js#1)

Despite applying various options to handle JavaScript errors in my code snippet, including disabling proxies and utilizing cloudflare for the website, I still face this issue. Any insights on how to resolve this would be highly appreciated. Thank you.

Answer №1

[MobX] Issue with Proxy

It appears that the JavaScript code has detected a lack of support for Proxy in HtmlUnit/Rhino's javascript engine. Typically, webpages perform feature checks at the beginning and provide feedback on any issues encountered (or ideally only use available features).

To address this issue, please consider opening an inquiry with HtmlUnit and providing the page URL for better troubleshooting.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm having some trouble with my jQuery.get() function in the javascript Saturday(), can anyone help me figure out what I'm doing wrong?

Can anyone help me troubleshoot my jQuery.get() method in the saturday() JavaScript function? Here is the code snippet I have been working on. This is what I have in my index.html file: <html> <head> <title>jVectorMap demo</title> ...

Looking to identify the correct element using inspect element while working with Python and Selenium?

When trying to access the menu and select an option using find_element_by_css_selector, find_element_by_name or driver.find_elements_by_id("#####").click(), it's not working. I believe this is because there are multiple options to choose fro ...

Nunjucks is throwing a block end error

Currently working with nunjucks2 along with express and node, I encountered an error after upgrading njk to version 2.4.2: Template render error: (/home/aien/Web/Test/express/views/error.html) Template render error: (/home/aien/Web/Test/express/views/lay ...

Error Type: Unable to access the X property because it is undefined

I have this Interface that serves as a type for a JSON file: export interface IIndustrySectors { IndustrySector: string; isSelected: string; dataSubjectCategories:string[]; dataTypeCategories:string[]; SubIndustries:[{ IndustrySector: stri ...

Cannot initiate a new remote session when trying to launch the iOS application on Kobiton cloud due to org.openqa.selenium.SessionNotCreatedException

Encountering an issue while attempting to run the automation script on iOS platform in Kobiton, I am receiving the following error message: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabili ...

issues encountered with sending a multidimensional array using ajax, specifically with the index[0]

I'm struggling with sending a multidimensional array from PHP to Javascript/jQuery, encountering a peculiar issue. Upon transmitting index 0 through json_encode($array);, the desired response format is successfully received by the client: [[0,0],[1, ...

Creating a Unique Carousel Design with Ant Design

https://i.sstatic.net/HobMm.jpg Steps to personalize the ant design carousel with these unique features: Use Bullets instead of Boxes Modify Bullet Color Place Bullets outside the image container Sandbox Link https://codesandbox.io/s/trusting-dream-zzjr ...

The API for executing Apps Script returns an unauthenticated error

My application is encountering an issue with the Apps Script execution API, while other APIs are functioning properly. The error code 401 is being thrown with the message: "Request is missing required authentication credential. Expected OAuth 2 access toke ...

Wordpress contact form not functional with AJAX feature currently experiencing issues

I am currently working on a Wordpress website and facing an issue with creating a form using an ajax call that should appear on every product page. The code worked smoothly on other servers, but when I integrated it into my Wordpress site (using Woocommerc ...

What is the best way to alter the text of a button when the mouse hovers over it?

I'm looking to create a button that can dynamically change the text inside it when the cursor hovers over it, and then revert back to the original text when the cursor moves away from it. I attempted this in VScode using "document.getElementById().inn ...

Passing data from the top-level ancestor to the deepest descendant in React

Struggling with passing props in React? Check out my folder structure: src Component Button.js Container PageContainer.js Page Page.js Using Bootstrap 4 to create a Button within Button.js: <div> <a className="btn btn-prim ...

Perform PHP function without refreshing the page when clicking

I have a PHP script that displays an alert box with the options OK or CANCEL. If OK is clicked, it redirects to a link that triggers a PHP function to delete the selected image. <?php //echo $pictures['binId']; if(count($other_images)) { ...

Unable to close Chrome driver following completion of capybara test

Currently, I am utilizing capybara 2.1.0 along with the default selenium webdriver, minitest, and test::unit. For certain tests that require the use of the .hover method, I switch to the Chrome webdriver. However, after running these tests using Chrome, I ...

Bringing JQuery into your Electron project through HTML

Working on some ElectronJS HTML coding and in need of using JQuery within the HTML. I've gone ahead and installed jQuery with npm install jquery. The question is, which file do I import to make use of JQuery? <!DOCTYPE html> <html lang="en" ...

Unable to access filteredItems from custom popup in uib-typeahead retrieval process

Issue with Retrieving Filtered Items from ng-repeat in Controller using $scope Despite trying to fetch filtered items from ng-repeat, the value of $scope.filteredItems appears as undefined when I log it to the console. I attempted to implement the solutio ...

Exploring the world of mobile 3D transformations

I'm hoping to find a way to incorporate 3D transformations by utilizing the accelerometer on mobile devices within the following JavaScript code. Any assistance is greatly appreciated! $(document).mousemove(rotateScene); }); function rotateScene(e) ...

Creating a drop-down menu in Angular 2

I'm working on my webApp and I have a menu that I want to enhance by adding a submenu. How can I achieve this? Do I need to attach a click event to the a tag with the has-sub class for each individual menu item, or is there a better solution? What sh ...

Merge the contents of the second nested array of objects with the first nested array of objects

How can I transfer key values from an array of objects to another array object? I want to assign the key:value pair from one array of objects to another existing array of objects. I've looked at this link, but it doesn't seem to work in my situ ...

Error encountered with $http.get during ng-click execution

edit: to make it clear, I have excluded some input fields and additional code, but all necessary information is included. I have searched extensively online without finding a solution. In my html, I am executing a function userSearch() on ng-click. The ng ...

Utilizing $limit and $sort in MongoDB using Q.nbind()

I've implemented the Q module in my app and I'm looking to incorporate the $limit and $sort functions for querying MongoDB. Additionally, I am utilizing Q.nbind() to facilitate my queries. var Q = require('q'); var mongoose = require(& ...