Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to read property "nodeValue" on null #14

Closed
luqmansolihin opened this issue Sep 22, 2022 · 11 comments
Closed

Attempt to read property "nodeValue" on null #14

luqmansolihin opened this issue Sep 22, 2022 · 11 comments
Labels

Comments

@luqmansolihin
Copy link

{ "class": "ErrorException", "message": "Attempt to read property \"nodeValue\" on null", "code": 0, "file": "/var/www/api_app/vendor/kadekjayak/bca-parser/src/BCAParser.php:332", "trace": [ "/var/www/api_app/vendor/kadekjayak/bca-parser/src/BCAParser.php:332", "/var/www/api_app/vendor/kadekjayak/bca-parser/src/BCAParser.php:363", "/var/www/api_app/vendor/kadekjayak/bca-parser/src/BCAParser.php:378", "/var/www/api_app/app/Services/BankMutationService.php:16", "/var/www/api_app/app/Services/BankMutationService.php:25", "/var/www/api_app/app/Console/Commands/BankMutationCron.php:46", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Container/Util.php:40", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Container/Container.php:653", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Console/Command.php:136", "/var/www/api_app/vendor/symfony/console/Command/Command.php:298", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Console/Command.php:121", "/var/www/api_app/vendor/symfony/console/Application.php:1024", "/var/www/api_app/vendor/symfony/console/Application.php:299", "/var/www/api_app/vendor/symfony/console/Application.php:171", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Console/Application.php:94", "/var/www/api_app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:129", "/var/www/api_app/artisan:37" ] }

error seperti ini muncul karena apa ya?

@fedry
Copy link

fedry commented Sep 24, 2022

sepertinya karena mobile klikbca sekarang uda mesti enable javascript.. saya coba debug function login() juga uda gagal. T_T

@kadekjayak
Copy link
Owner

@fedry wah kalau begitu metode scraping ini kemungkinan tidak bisa digunakan lagi...

@ace3
Copy link

ace3 commented Sep 24, 2022

ini saya kebetulan menggunakan script single php file, modif sendiri, dengan ngambil inspirasi dari sini, dan masi jalan.

@fedry
Copy link

fedry commented Sep 24, 2022

ini saya kebetulan menggunakan script single php file, modif sendiri, dengan ngambil inspirasi dari sini, dan masi jalan.

kalau masih jalan, bole di-share script utk bagian loginnya? :)

@ace3
Copy link

ace3 commented Sep 24, 2022

$this->conf['ip'] = 'x.x.x.x';
date_default_timezone_set('Asia/Jakarta');
$this->conf['time'] = time();
$this->conf['path'] = dirname(__FILE__);

function login($username, $password)
    {
        $this->ch = curl_init();
        
        curl_setopt($this->ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1');
        curl_setopt($this->ch, CURLOPT_URL, 'https://m.klikbca.com/login.jsp');
        curl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->conf['path'] . '/cookie');
        curl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->conf['path'] . '/cookiejar');
        
        $this->curlexec();
        
        $params = implode('&', array('value(user_id)=' . $username, 'value(pswd)=' . $password, 'value(Submit)=LOGIN', 'value(actions)=login', 'value(user_ip)=' . $this->conf['ip'], 'user_ip=' . $this->conf['ip'], 'value(mobile)=true', 'mobile=true'));
        
        curl_setopt($this->ch, CURLOPT_URL, 'https://m.klikbca.com/authentication.do');
        curl_setopt($this->ch, CURLOPT_REFERER, 'https://m.klikbca.com/login.jsp');
        curl_setopt($this->ch, CURLOPT_POSTFIELDS, $params);
        curl_setopt($this->ch, CURLOPT_POST, 1);
        
        $this->curlexec();
    }

@kadekjayak
Copy link
Owner

hmm, spertinya terkait masalah saat resolve ip address

@fedry
Copy link

fedry commented Sep 24, 2022

hmm, spertinya terkait masalah saat resolve ip address

iya.. ini masalah jg.
tapi saya hardcode ip addressnya, tetep gak bisa jalan jg...

ada yg berhasil setelah di hardcode ip addressnya?

@kadekjayak
Copy link
Owner

@fedry hari ini saya test dengan IP manual masih bisa mas ambil transaksi...

@kadekjayak kadekjayak added the bug label Sep 25, 2022
@kadekjayak
Copy link
Owner

@luqmansolihin barusan saya update ip resolver nya dan masih berfungsi dengan baik.

ef86bfe

@luqmansolihin
Copy link
Author

@kadekjayak terimakasih, sudah solve sekarang.

@fedry
Copy link

fedry commented Sep 26, 2022

yes.. ini uda sembuh... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants