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

Beckn - Search Requests Return Empty Unless BPP ID is Specified #245

Open
3 tasks
viraj89 opened this issue Dec 2, 2024 · 1 comment
Open
3 tasks

Beckn - Search Requests Return Empty Unless BPP ID is Specified #245

viraj89 opened this issue Dec 2, 2024 · 1 comment
Assignees
Labels
beckn onix beckn onix ONIX Open Network in a Box

Comments

@viraj89
Copy link
Collaborator

viraj89 commented Dec 2, 2024

Description:

Since the last week, it has been noticed that search requests return empty responses unless the BPP ID is explicitly provided. Despite checking all logs and settings, the root cause remains unclear.

Additionally, the following issues have been observed:

  • There is no ngrok account in the registry (it was cleaned up, leaving only valid Network Participants).
  • An error in the Registry logs suggests a casting issue (JSONObject cannot be cast to JSONArray).

Logs:

INFO: Request : curl -H 'ACCEPT: application/json' -H 'AUTHORIZATION: Signature keyId="agriorg-bap-network.biharkrishi.in|agriorg-bap-network.biharkrishi.in-key|ed25519",algorithm="ed25519",created="1732790911",expires="1732794511",headers="(created) (expires) digest",signature="WfybUwj1SEDT+lrJGymK2+ai3LY68NVurvBAyOKRhv5ZPvkgm0jP25Q5dVbUCtCe6lI7fstzGgSg2tZfbw0mCg=="' -H 'CONTENT-TYPE: application/json' -H 'PROXY-AUTHORIZATION: Signature keyId="gateway-sandbox-vistaar.da.gov.in|gateway-sandbox-vistaar.da.gov.in.k1|ed25519",algorithm="ed25519",created="1732790972",expires="1733390972",headers="(created) (expires) digest",signature="x/K/mdxd7xbACtZrkxjGUJzDMdwbFpumP8+hdV8jyjxJgLzujtEkTEgDr8F83grzM0Ulvfr+Z/X+AI9ROijlDg=="' -H 'X-GATEWAY-AUTHORIZATION: Signature keyId="gateway-sandbox-vistaar.da.gov.in|gateway-sandbox-vistaar.da.gov.in.k1|ed25519",algorithm="ed25519",created="1732790972",expires="1733390972",headers="(created) (expires) digest",signature="x/K/mdxd7xbACtZrkxjGUJzDMdwbFpumP8+hdV8jyjxJgLzujtEkTEgDr8F83grzM0Ulvfr+Z/X+AI9ROijlDg=="' 'https://icar-bpp.tekdinext.com/search' -d '{"context":{"ttl":"PT10M","action":"search","timestamp":"2024-11-28T10:49:31.620Z","message_id":"ad5cc4bd-b05f-4144-aeda-2395bf26bd68","transaction_id":"a70b01f3-dd09-4f12-8a9b-219cf057ddba","domain":"knowledge-advisory:agrinet:vistaar","version":"1.1.0","bap_id":"agriorg-bap-network.biharkrishi.in","bap_uri":"https://agriorg-bap-network.biharkrishi.in/"},"message":{"intent":{"item":{"descriptor":{}}}}}' Nov 28, 2024 4:19:38 PM com.venky.core.log.BetterLogger info INFO: Request : curl -H 'ACCEPT: application/json' -H 'AUTHORIZATION: Signature keyId="gateway-sandbox-vistaar.da.gov.in|gateway-sandbox-vistaar.da.gov.in.k1|ed25519",algorithm="ed25519",created="1732790977",expires="1732800977",headers="(created) (expires) digest",signature="oGuJvCARGHkKgo95xZ+iL0ONqi0Wdxf0Fm4N+cu97iJ26HpjCUx+YS+9QT7fhOxl3Jis41/8DqzIro1i/20VCQ=="' -H 'CONTENT-TYPE: application/json' -H 'PROXY-AUTHORIZATION: Signature keyId="gateway-sandbox-vistaar.da.gov.in|gateway-sandbox-vistaar.da.gov.in.k1|ed25519",algorithm="ed25519",created="1732790977",expires="1732800977",headers="(created) (expires) digest",signature="oGuJvCARGHkKgo95xZ+iL0ONqi0Wdxf0Fm4N+cu97iJ26HpjCUx+YS+9QT7fhOxl3Jis41/8DqzIro1i/20VCQ=="' -H 'X-GATEWAY-AUTHORIZATION: Signature keyId="gateway-sandbox-vistaar.da.gov.in|gateway-sandbox-vistaar.da.gov.in.k1|ed25519",algorithm="ed25519",created="1732790977",expires="1732800977",headers="(created) (expires) digest",signature="oGuJvCARGHkKgo95xZ+iL0ONqi0Wdxf0Fm4N+cu97iJ26HpjCUx+YS+9QT7fhOxl3Jis41/8DqzIro1i/20VCQ=="' 'https://registry-sandbox-vistaar.da.gov.in/subscribers/disable' -d '{"created":"2024-07-18T06:23:35.000Z","valid_from":"2024-07-17T06:24:00.000Z","type":"BPP","extended_attributes":{},"signing_public_key":"PIExPlCRq7wOYEi5rZnOplvbNoN4lRNH308Bbbqmob4=","subscriber_id":"icar-bpp.tekdinext.com","unique_key_id":"icar-bpp.tekdinext.com-key-1234","valid_until":"2028-07-18T06:24:00.000Z","subscriber_url":"https:\/\/icar-bpp.tekdinext.com","domain":"knowledge-advisory:agrinet:vistaar","encr_public_key":"PIExPlCRq7wOYEi5rZnOplvbNoN4lRNH308Bbbqmob4=","updated":"2024-07-18T07:17:17.000Z","status":"SUBSCRIBED"}' Status: 400 Error: { "error" : "class org.json.simple.JSONObject cannot be cast to class org.json.simple.JSONArray (org.json.simple.JSONObject and org.json.simple.JSONArray are in unnamed module of loader 'app')" ,"message" : "" ,"status" : "FAILED" }

Goals:

  • Investigate the root cause of search requests returning empty unless the BPP ID is provided.
  • Resolve the JSONObject to JSONArray casting error in the Registry logs.
  • Ensure that the system handles search requests correctly without requiring a BPP ID.

Mockups / Wireframes:

NA

Product Name:

Beckn ONIX

Domain:

Beckn ONIX

Tech Skills Needed:

  • Beckn Protocol
  • Registry and Subscriber Management

Complexity:

High

Category:

Bug

Sub Category:

Search and Registry Integration

@viraj89 viraj89 added ONIX Open Network in a Box beckn onix beckn onix labels Dec 2, 2024
@prasad-takale-eminds
Copy link
Collaborator

I connected with Venky, and he confirmed that the BPP is not accessible from the gateway.
We have shared the Nginx configuration file with Vinod's team and requested them to review the Nginx setup on their server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beckn onix beckn onix ONIX Open Network in a Box
Projects
None yet
Development

No branches or pull requests

2 participants