#How to obtain token for Reaper?

1 messages Β· Page 1 of 1 (latest)

digital karma
#

hi πŸ‘‹ . I read An open-source SDK for finding dead code article and tried to integrate Reaper in my Android app. But I'm getting

Unexpected code Response{protocol=h2, code=403, message=, url=https://api.emergetools.com/upload}

when building the app. I'm guessing that the lack of EMERGE_API_TOKEN is the problem. But I can't find any up to date information on how to obtain one. Do I still need Emerge account/subscription to use this tool, even though SDKs and backend are open source now?

Product Blog β€’ Sentry

Writing code is easier than ever. We want to make deleting code just as easy – introducing Reaper for iOS and Android. Reaper was an Emerge Tools product that h...

digital karma
#

I was thinking that, as long as I use my own backend, I don't need to use Emerge Gradle Plugin but without it the app logs in runtime

Reaper is not enabled, ensure this variant is specified in the reaper.enabledVariants list in the Emerge gradle plugin configuration block. See https://docs.emergetools.com/docs/reaper-setup-android#configure-the-sdk.

so I guess I need it?

#

Actually, reading how it works under the hood, it makes sense that a build-time plugin is necessary πŸ™‚

digital karma
#

hello folks, a friendly ping: is it possible to use Reaper these days if I'm not registered at Emerge Tools?

idle cobalt
# digital karma hi πŸ‘‹ . I read [An open-source SDK for finding dead code](https://blog.sentry.io...

Hey! Sorry @digital karma this got a bit lost over the holidays XD. Yes it is possible to use however we don't offer a 'service' backend for Reaper anymore. If you want to use it now you have to stand up your own backend to receive and process the reports. On the client side that looks like setting your custom URL in the manifest as mentioned here: https://blog.sentry.io/an-open-source-sdk-for-finding-dead-code/#reaper-for-android-4

#

Let me know if that helps and if you have any further questions!

digital karma
#

No worries, completely understandable. Thank you for the reply @idle cobalt ! πŸ™‚

It's great that you offer it, and I'm completely fine with hosting our own backend for Reaper. But still, the Reaper Gradle Plugin doesn't work without EMERGE_API_TOKEN and when I provide a dummy value, I'm getting 403 (as in the first message).

What value can I provide there for Reaper Gradle Plugin to work?

idle cobalt
#

Ah I see! Hmm that's werid :/ Does the message still show same URL: Unexpected code Response{protocol=h2, code=403, message=, url=https://api.emergetools.com/upload}? I would have expected it to say something different if the override is being picked up.

#

Hmm actually it looks like we don't have an official release of the Repaer library with the override in yet.

#

Which would explain the issues you are having. Right now you can use emergeReaper = "1.0.1-SNAPSHOT". I'll try and sort out a 1.0.2 release shortly.

digital karma
#

Thank you for checking! I'll test the 1.0.1-SNAPSHOT and reply here later this week πŸ‘

digital karma
#

πŸ‘‹

Which would explain the issues you are having. Right now you can use emergeReaper = "1.0.1-SNAPSHOT". I'll try and sort out a 1.0.2 release shortly.

I see you mean the runtime library - I understand and updated it but it didn't help. I think the problem is before the app launches - at the time of actual build time.

Assuming I have a simple configuration like this

plugins {
    id("com.emergetools.android") version "4.4.0"
}

emerge {
    reaper {
        enabledVariants = ["myVariant"]
        publishableApiKey = "key"
    }
}

when I execute

./gradlew emergeReaperPreflightMyVariant

I'm getting

╔═════════════════════════════════════╗
β•‘ Reaper preflight check failed (3/4) β•‘
╠═════════════════════════════════════╝
╠═ ❌ Emerge API token set
╠═ βœ… enabled for variant: wordpressVanillaRelease
╠═ βœ… publishableApiKey set
β•šβ• βœ… Runtime Library added

I think in the current form, the Reaper Gradle Plugin still needs the Emerge API token. So this circles back to my original question: is it possible to obtain the token somehow?

digital karma
#

updated it but it didn't help
a sorry, I didn't really tested the snapshot, I'm actually getting Could not find com.emergetools.reaper:reaper:1.0.1-SNAPSHOT. during the build