I am trying to connect my custom source connector ...
# ask-community-for-troubleshooting
d
I am trying to connect my custom source connector in UI. After selecting my connector, the below API fired and throws the following error. I have mentioned documentation_url in spec.yaml file. Can anyone help me how to resolve this error? http://localhost:8000/api/v1/source_definition_specifications/get
Copy code
{
  "message": "Internal Server Error: Cannot invoke \"java.net.URI.toString()\" because the return value of \"io.airbyte.protocol.models.ConnectorSpecification.getDocumentationUrl()\" is null",
  "exceptionClassName": "java.lang.NullPointerException",
  "exceptionStack": [
    "java.lang.NullPointerException: Cannot invoke \"java.net.URI.toString()\" because the return value of \"io.airbyte.protocol.models.ConnectorSpecification.getDocumentationUrl()\" is null",
    "\tat io.airbyte.server.handlers.SchedulerHandler.getSourceDefinitionSpecification(SchedulerHandler.java:283)",
    "\tat io.airbyte.server.apis.ConfigurationApi.lambda$getSourceDefinitionSpecification$20(ConfigurationApi.java:405)",
    "\tat io.airbyte.server.apis.ConfigurationApi.execute(ConfigurationApi.java:886)",
    "\tat io.airbyte.server.apis.ConfigurationApi.getSourceDefinitionSpecification(ConfigurationApi.java:405)",
    "\tat java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)",
    "\tat java.base/java.lang.reflect.Method.invoke(Method.java:578)",
    "\tat org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)",
    "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)",
    "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)",
    "\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219)",
    "\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)",
    "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)",
    "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)",
    "\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)",
    "\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253)",
    "\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)",
    "\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)",
    "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:292)",
    "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:274)",
    "\tat org.glassfish.jersey.internal.Errors.process(Errors.java:244)",
    "\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)",
    "\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232)",
    "\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)",
    "\tat org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)",
    "\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)",
    "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:366)",
    "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:319)",
    "\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)",
    "\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)",
    "\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:569)",
    "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)",
    "\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377)",
    "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)",
    "\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:507)",
    "\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)",
    "\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292)",
    "\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
    "\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)",
    "\tat org.eclipse.jetty.server.Server.handle(Server.java:501)",
    "\tat org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)",
    "\tat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)",
    "\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)",
    "\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)",
    "\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)",
    "\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)",
    "\tat org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)",
    "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)",
    "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)",
    "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)",
    "\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)",
    "\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)",
    "\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)",
    "\tat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)",
    "\tat java.base/java.lang.Thread.run(Thread.java:1589)"
  ]
}
e
Hi. Did you pass all tests when creating the source?
d
Yes. I did the following and I don't see any issues • Spec • check • discover • read unit_test also passed
Copy code
(.venv392) ubuntu@ip-172-31-44-147:~/work/software/airbyte/airbyte-integrations/connectors/source-apple-search-ads (master)$ pytest unit_tests
Test session starts (platform: linux, Python 3.10.4, pytest 6.2.5, pytest-sugar 0.9.5)
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/ubuntu/work/software/airbyte/airbyte-integrations/connectors/source
-apple-search-ads/.hypothesis/examples')
rootdir: /home/ubuntu/work/software/airbyte, configfile: pytest.ini
plugins: asdf-2.13.0, cov-3.0.0, hypothesis-6.54.4, timeout-1.4.2, mock-3.6.1, requests-mock-1.9.3, sugar-0.9.5
collecting ...
 airbyte-integrations/connectors/source-apple-search-ads/unit_tests/unit_test.py::test_example_method ✓                           100% ██████████

Results (0.59s):
       1 passed
s
Seems that the connector container is not behaving the same as your source code. Can you try rebuilding the image in case they are not in sync?
docker build . -t airbyte/source-apple-search-ads:<tag>
1
d
We tried that @Sunny Hashmi (Airbyte). Still showing the same issue. Can tell me, from which file its extracts the documentation URL? source-apple-search-ads/spec.yaml or source-definitions for source-apple-search-ads
Copy code
{
  "sourceDefinitionId": "e8668294-5376-483e-a0a3-a4ba3a4fa317",
  "name": "SearchAds",
  "dockerRepository": "mycompany/source",
  "dockerImageTag": "0.0.1",
  "documentationUrl": "<https://example.com>",
  "releaseStage": "custom"
}
The above files have documentation_url in spec.yaml
e
You can check\add documentation url in rel path:
Copy code
airbyte-config\init\src\main\resources\seed\source_definitions.yaml
d
I have added definition details also in source_definitions.yaml. But no use. - name: SearchAds sourceDefinitionId: e8668294-5376-483e-a0a3-a4ba3a4fa317 dockerRepository: mycompany/source dockerImageTag: 0.0.1 documentationUrl: https://example.com icon: appstore.svg sourceType: api releaseStage: custom
e
in
Copy code
airbyte-config\init\src\main\resources\seed\source_definitions.yaml
you`ve added logic for appstore in the yaml file? the error says that the image cant find the URI try to see if it exists in: rel path:
Copy code
airbyte-config\init\src\main\resources\seed\source_specs.yaml
documentationUrl