Iglu server: ResolutionError - repository NotFound

Hi everyone,
we deployed a Snowplow infrastructure to AWS as well as Iglu server (version 0.7.0).
After that, I registered a public schema for the self-describing event at our previously setup Iglu server:

{
    "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
    "description": "Schema for the PageView event",
    "self": {
        "vendor": "VendorName",
        "name": "PageViewEvent",
        "format": "jsonschema",
        "version": "1-0-0"
    },
    "type": "object",
    "properties": {
        "CustomerId": {
            "type": "integer"
        },
        "UserId": {
            "type": "integer"
        }
    },
    "required": [
        "CustomerId",
        "UserId"
    ],
    "additionalProperties": true
}

Then I tried to track my event with the JS browser tracker:

        snowplow('trackSelfDescribingEvent', {
            event: {
                schema: 'iglu:VendorName/PageViewEvent/jsonschema/1-0-0',
                data: {
                    "CustomerId": 1,
                    "UserId": 1
                }
            }
        });

The event record passes collection and enrichment, I can see that event at AWS S3 “enriched” folder, but unfortunately loading to AWS Redshift fails on the shredding process.

Appropriate AWS S3 folder contains log entry at transformed/good/…/output=bad/vendor=com.snowplowanalytics.snowplow.badrows/name=loader_iglu_error/format=json/model=2/

It is likely that shredder cannot find the required schema for some reason:

{
    "schema": "iglu:com.snowplowanalytics.snowplow.badrows/loader_iglu_error/jsonschema/2-0-0",
    "data": {
        "processor": {
            "artifact": "snowplow-transformer-kinesis",
            "version": "4.2.1"
        },
        "failure": [{
                "schemaCriterion": "iglu:VendorName/PageViewEvent/jsonschema/1-*-*",
                "error": {
                    "error": "ResolutionError",
                    "lookupHistory": [{
                            "repository": "Iglu Central",
                            "errors": [{
                                    "error": "NotFound"
                                }
                            ],
                            "attempts": 9,
                            "lastAttempt": "2022-09-21T14:19:09.848Z"
                        }, {
                            "repository": "Iglu Central - Mirror 01",
                            "errors": [{
                                    "error": "NotFound"
                                }
                            ],
                            "attempts": 9,
                            "lastAttempt": "2022-09-21T14:19:09.938Z"
                        }, {
                            "repository": "Iglu Client Embedded",
                            "errors": [{
                                    "error": "NotFound"
                                }
                            ],
                            "attempts": 1,
                            "lastAttempt": "2022-09-20T13:04:31.201Z"
                        }
                    ]
                }
            }
        ],
        "payload": {
            "app_id": "VendorNamePortal",
            "platform": "web",
            "etl_tstamp": "2022-09-21T14:19:07.306Z",
            "collector_tstamp": "2022-09-21T14:19:06.387Z",
            "dvce_created_tstamp": "2022-09-21T14:18:46.301Z",
            "event": "unstruct",
            "event_id": "d890ce55-a4bb-471d-bfa8-c3eafa15a32c",
            "txn_id": null,
            "name_tracker": "JSTracker",
            "v_tracker": "js-3.6.0",
            "v_collector": "snowplow-stream-collector-kinesis-2.4.5-kinesis",
            "v_etl": "streamCommon-2.0.5-common-2.0.5",
            "user_id": null,
            "user_ipaddress": "176.37.91.66",
            "user_fingerprint": null,
            "domain_userid": "b02da5ad-4956-460f-ab31-1c2d7e1d7b25",
            "domain_sessionidx": 15,
            "network_userid": "48a4f240-0f15-4d8e-a7f2-564df6cfe54c",
            "geo_country": null,
            "geo_region": null,
            "geo_city": null,
            "geo_zipcode": null,
            "geo_latitude": null,
            "geo_longitude": null,
            "geo_region_name": null,
            "ip_isp": null,
            "ip_organization": null,
            "ip_domain": null,
            "ip_netspeed": null,
            "page_url": "http://localhost:85/",
            "page_title": null,
            "page_referrer": null,
            "page_urlscheme": "http",
            "page_urlhost": "localhost",
            "page_urlport": 85,
            "page_urlpath": "/",
            "page_urlquery": null,
            "page_urlfragment": null,
            "refr_urlscheme": null,
            "refr_urlhost": null,
            "refr_urlport": null,
            "refr_urlpath": null,
            "refr_urlquery": null,
            "refr_urlfragment": null,
            "refr_medium": null,
            "refr_source": null,
            "refr_term": null,
            "mkt_medium": null,
            "mkt_source": null,
            "mkt_term": null,
            "mkt_content": null,
            "mkt_campaign": null,
            "contexts": {
                "schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
                "data": [{
                        "schema": "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",
                        "data": {
                            "id": "0d30bdf7-8e3c-4749-8304-5aef5323b483"
                        }
                    }
                ]
            },
            "se_category": null,
            "se_action": null,
            "se_label": null,
            "se_property": null,
            "se_value": null,
            "unstruct_event": {
                "schema": "iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
                "data": {
                    "schema": "iglu:VendorName/PageViewEvent/jsonschema/1-0-0",
                    "data": {
                        "CustomerId": 1,
                        "UserId": 1
                    }
                }
            },
            "tr_orderid": null,
            "tr_affiliation": null,
            "tr_total": null,
            "tr_tax": null,
            "tr_shipping": null,
            "tr_city": null,
            "tr_state": null,
            "tr_country": null,
            "ti_orderid": null,
            "ti_sku": null,
            "ti_name": null,
            "ti_category": null,
            "ti_price": null,
            "ti_quantity": null,
            "pp_xoffset_min": null,
            "pp_xoffset_max": null,
            "pp_yoffset_min": null,
            "pp_yoffset_max": null,
            "useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
            "br_name": null,
            "br_family": null,
            "br_version": null,
            "br_type": null,
            "br_renderengine": null,
            "br_lang": "en-US",
            "br_features_pdf": null,
            "br_features_flash": null,
            "br_features_java": null,
            "br_features_director": null,
            "br_features_quicktime": null,
            "br_features_realplayer": null,
            "br_features_windowsmedia": null,
            "br_features_gears": null,
            "br_features_silverlight": null,
            "br_cookies": true,
            "br_colordepth": "24",
            "br_viewwidth": 997,
            "br_viewheight": 912,
            "os_name": null,
            "os_family": null,
            "os_manufacturer": null,
            "os_timezone": "Europe/Kiev",
            "dvce_type": null,
            "dvce_ismobile": null,
            "dvce_screenwidth": 1920,
            "dvce_screenheight": 1080,
            "doc_charset": "UTF-8",
            "doc_width": 997,
            "doc_height": 912,
            "tr_currency": null,
            "tr_total_base": null,
            "tr_tax_base": null,
            "tr_shipping_base": null,
            "ti_currency": null,
            "ti_price_base": null,
            "base_currency": null,
            "geo_timezone": null,
            "mkt_clickid": null,
            "mkt_network": null,
            "etl_tags": null,
            "dvce_sent_tstamp": "2022-09-21T14:18:46.304Z",
            "refr_domain_userid": null,
            "refr_dvce_tstamp": null,
            "derived_contexts": {
                "schema": "iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",
                "data": [{
                        "schema": "iglu:com.snowplowanalytics.snowplow/ua_parser_context/jsonschema/1-0-0",
                        "data": {
                            "useragentFamily": "Chrome",
                            "useragentMajor": "105",
                            "useragentMinor": "0",
                            "useragentPatch": "0",
                            "useragentVersion": "Chrome 105.0.0",
                            "osFamily": "Windows",
                            "osMajor": "10",
                            "osMinor": null,
                            "osPatch": null,
                            "osPatchMinor": null,
                            "osVersion": "Windows 10",
                            "deviceFamily": "Other"
                        }
                    }, {
                        "schema": "iglu:nl.basjes/yauaa_context/jsonschema/1-0-2",
                        "data": {
                            "deviceBrand": "Unknown",
                            "deviceName": "Desktop",
                            "operatingSystemVersionMajor": "??",
                            "layoutEngineNameVersion": "Blink 105.0",
                            "operatingSystemNameVersion": "Unknown ??",
                            "layoutEngineNameVersionMajor": "Blink 105",
                            "operatingSystemName": "Unknown",
                            "agentVersionMajor": "105",
                            "layoutEngineVersionMajor": "105",
                            "deviceClass": "Desktop",
                            "agentNameVersionMajor": "Chrome 105",
                            "operatingSystemNameVersionMajor": "Unknown ??",
                            "deviceCpuBits": "64",
                            "operatingSystemClass": "Desktop",
                            "layoutEngineName": "Blink",
                            "agentName": "Chrome",
                            "agentVersion": "105",
                            "layoutEngineClass": "Browser",
                            "agentNameVersion": "Chrome 105",
                            "operatingSystemVersion": "??",
                            "deviceCpu": "Intel x86_64",
                            "agentClass": "Browser",
                            "layoutEngineVersion": "105.0"
                        }
                    }
                ]
            },
            "domain_sessionid": "6bfff873-f4c6-4636-a82b-6cbff522fa4d",
            "derived_tstamp": "2022-09-21T14:19:06.384Z",
            "event_vendor": "VendorName",
            "event_name": "PageViewEvent",
            "event_format": "jsonschema",
            "event_version": "1-0-0",
            "event_fingerprint": "792586b166b00235840e24c66f2eb801",
            "true_tstamp": null
        }
    }
}

Typical events, which do not require schema work successfully, but self-describing events or events with custom context fail.
Could you please advise?

Hi @alved ,

Welcome to Snowplow community !

Thanks for the details.

Looking at the bad row, it seems that you didn’t add your custom Iglu server to the list of repositories in the resolver configuration of the transformer. You need to add it to the file in the exact same way as you did for enrich.

2 Likes

Not related to the issue at hand but just a tracking design tip - if you put CustomerId and UserId into a custom ‘user’ entity, and attach it to the default page view events, you’ll be able to achieve the same thing, but will get the benefit of things like page pings and running the web model out of the box (which will likely save you a lot of effort).

You could also reuse the entity across different events to make analysis more powerful in future.

You’d still need a custom schema and resolver would still need to be updated as Ben mentioned, my comment is totally separate from that, but hope it’s helpful! :slight_smile:

2 Likes

Hi @BenB,
Thank you so much for your hint, I’ll check it with our DevOps engineer!

Hi @Colm,
thank you for your ideas, in fact, I was going to use standard built-in events, like PageView and then just extend them by adding custom data to a context.
But after facing this issue I decided to try pure self-describing events and make sure I could solve the problem. I believe I’ll return to the standard events with custom context anyway.

1 Like