Open extra topbar

Claim not working

If you are new here, please see some information on how to ask for support. Thank you!

Claim not working

dashed-slug.net Forums Faucet extension support Claim not working

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #8530
    emeisglobal
    Participant

    i have setup my faucet for solve media and google captcha, but it not working at all, pleae how do i fix it,
    here is a link to it https://emeisworld.com/faucet.

    #8531
    alexg
    Keymaster

    Hello,

    Can you please describe what exactly is not working? What happens when you try to claim? Is there any error message? Please describe what you see so I can help. Thank you.

    with regards

    #8534
    emeisglobal
    Participant

    there is no error it just reload the page, and no coins is paid, here is a demo account to confirm what i mean,

    Username: REMOVED

    Password: REMOVED

    URL’; emeisworld.com

    #8536
    alexg
    Keymaster

    Hello,

    I logged in and confirmed that this is the case. The problem is caused by some optimization plugin but I can’t do anything more with a user account.

    I see two problems that may be related, and both must be solved:

    1. There is a JavaScript error in the browser console. This occurs in minified JS code, possibly by WP Super Minify. Disable the minifier and see if the problem still occurs. I am not sure if this is causing a problem with the faucet, but it is causing an issue with the other UIs.

    2. Normally the faucet will refresh and show you a result message indicating either success or failure. This will be in a div with the following classes: wallets-faucet, message. I do not see such a div in the response. This is again due to some caching/optimization plugin. Try disabling your optimization plugins and try again.

    In general, if you are using optimization plugins, first ensure that the faucet works with all such plugins disabled. Then, enable each other plugin, one-by-one, checking if the faucet still works. You may need to add an exclusion for your /faucet page. How you add exclusions in each caching/optimization plugin will vary but it’s usually a simple regex that you can add in that plugin’s settings.

    In conclusion, try again with all such plugins disabled and let me know 1) if the JS error is still there and 2) if the faucet is working. Once we can establish that the faucet is working without optimizations, we can start to see how to re-enable the optimizers.

    with regards

    P.S, I have removed the credentials from your post because this forum is public.

    #8537
    emeisglobal
    Participant

    am using cloudflare caching, but no caching plugin on the site.

    #8538
    alexg
    Keymaster

    OK then disable cloudflare and the script minifier that you’re using.

    If unsure, disable as many plugins as possible.

    Then, let me know what you found about my questions 1) and 2) above.

    #8539
    emeisglobal
    Participant

    Now am getting error of captcha solve incoprrectly

    #8543
    alexg
    Keymaster

    OK this is an improvement, since you are now seeing the error. You may need to add a cache exclusion on your faucet page.

    What did you disable to make it work?

    Additionally, there is now no JavaScript error. If you haven’t changed anything else, then this was caused by your minifier, improperly concatenating assets.

    I logged in and tried again. I get “CAPTCHA solved incorrectly.” with the SolveMedia captcha. I noticed that you’ve removed the Google reCAPTCHA. Did you try again with reCAPTCHA? Also, can you try entering again your SolveMedia keys? Ensure that there are no leading or trailing spaces in your secret strings.

    Summary: 1) does reCAPTCHA work? 2) did you check the secret keys again? 3) do the secrets have any leading/trailing spaces? 4) What did you disable? Cloudflare? Some other plugins?

    Let me know what you tried and what happened and we’ll take it from there.

    thanks

    #8544
    alexg
    Keymaster

    In addition to the above, it is possible that the issue has something to do with CloudFlare. I’ve never used it and the code is not tested for it.

    After trying all of the above, please edit the file wp-content/plugins/wallets-faucet/includes/claim.php. Try changing this function:

    private static function get_remote_ip() {
    	if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    		return $_SERVER['HTTP_X_FORWARDED_FOR'];
    	} elseif ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) {
    		return $_SERVER['HTTP_CF_CONNECTING_IP'];
    	} elseif ( isset( $_SERVER['HTTP_X_FORWARDED'] ) ) {
    		return $_SERVER['HTTP_X_FORWARDED'];
    	} elseif ( isset( $_SERVER['HTTP_FORWARDED_FOR'] ) ) {
    		return $_SERVER['HTTP_FORWARDED_FOR'];
    	} elseif ( isset( $_SERVER['HTTP_FORWARDED'] ) ) {
    		return $_SERVER['HTTP_FORWARDED'];
    	} elseif ( isset( $_SERVER['HTTP_X_REAL_IP'] ) ) {
    		return $_SERVER['HTTP_X_REAL_IP'];
    	} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
    		return $_SERVER['HTTP_X_FORWARDED_FOR'];
    	}
    	return $_SERVER['REMOTE_ADDR'];
    }

    to the following:

    private static function get_remote_ip() {
    	return $_SERVER['REMOTE_ADDR'];
    }

    And try another claim.

    This will use CloudFlare’s IP rather than the host IP in the captcha request. If this works, let me know and I will fix this in the next patch release for the faucet.

    Hope this helps. Please let me know what you found.

    with regards

    #8546
    emeisglobal
    Participant

    i was able to fix it with the following method,

    1. i disabled the minification in wordpress and cloudflare.
    2. i disabled the proxy status to DNS only, so all request goes directly to my wordpress server
    3. exclude the faucet page from caching.

    thats fix the whole things, but it also good to include cloudflare in your next release as cloudflare help protect against hackers and spams, thats additional security.

    thank you for the support.

    #8547
    emeisglobal
    Participant

    by the way, how do i reduce the timer to claim.

    #8548
    alexg
    Keymaster

    OK, this is great news. It confirms that the issue had to do with CloudFlare. Thank you for keeping me updated and for your help in debugging this issue.

    I believe that a change in the get_remote_ip function can solve this problem, and then you can re-enable CloudFlare. This is because the captcha services want to know the CloudFlare IP, not the actual server IP. This function was built for detecting the actual server IP.

    In any case, I will release an update either today or tomorrow, and will notify you again here.

    Also, keep the faucet page excluded from caching. It is a dynamic page and should not be cached. This is also true for the JSON API, so also exclude any requests with the __wallets_action GET parameter.

    with regards

    #8549
    emeisglobal
    Participant

    sorry, a new problem resurface again, only the recaptcha is working now, the solve media is not working, it shows captcha incorrectly.

    #8553
    alexg
    Keymaster

    Hello,

    I logged in to your site’s faucet page but the SolveMedia CAPTCHA is not there, so I can’t test it. Can you describe what is not working? Is the shortcode still there?

    I will delay the next patch release until we figure this out.

    P.S. Additionally, your page loads take a very long time, sometimes more than 30 seconds. Even without caching this is not normal. You really should debug this. This is probably unrelated to the faucet, but maybe it isn’t.

    #8563
    emeisglobal
    Participant

    i moved the solve media to another page, you can test it from there, here is ther url, https://emeisworld.com/test

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.